From c74865208cf65b6998c44bda406cc41b3cc2d779 Mon Sep 17 00:00:00 2001 From: Juan P Lopez Date: Mon, 21 Oct 2024 19:29:50 -0500 Subject: [PATCH] test: fix consent initialization --- apps/consent/cypress/e2e/login-email.cy.ts | 8 +++----- apps/consent/cypress/e2e/login-phone.cy.ts | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/consent/cypress/e2e/login-email.cy.ts b/apps/consent/cypress/e2e/login-email.cy.ts index 4fbd0cff14..0774e7f3d5 100644 --- a/apps/consent/cypress/e2e/login-email.cy.ts +++ b/apps/consent/cypress/e2e/login-email.cy.ts @@ -1,17 +1,15 @@ import { testData } from "../support/test-config" describe("Account ID Test", () => { - before(() => { + it("Login email Test", () => { + const email = testData.EMAIL + cy.flushRedis() cy.visit(testData.AUTHORIZATION_URL) cy.location("search").should((search) => { const params = new URLSearchParams(search) expect(params.has("login_challenge")).to.be.true }) - }) - - it("Login email Test", () => { - const email = testData.EMAIL cy.get("[data-testid=sign_in_with_phone_btn]") .should("exist") diff --git a/apps/consent/cypress/e2e/login-phone.cy.ts b/apps/consent/cypress/e2e/login-phone.cy.ts index 3a0f6240ef..32f90f7ab9 100644 --- a/apps/consent/cypress/e2e/login-phone.cy.ts +++ b/apps/consent/cypress/e2e/login-phone.cy.ts @@ -1,16 +1,14 @@ import { testData } from "../support/test-config" describe("Account ID Test", () => { - before(() => { + it("Login Phone Test", () => { cy.flushRedis() cy.visit(testData.AUTHORIZATION_URL) cy.location("search").should((search) => { const params = new URLSearchParams(search) expect(params.has("login_challenge")).to.be.true }) - }) - it("Login Phone Test", () => { cy.get("[data-testid=sign_in_with_email_btn]") .should("exist") .should("be.visible")