Skip to content

Commit

Permalink
slightly modified the locators for a failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukhamediyar Kudaikulov committed Jul 19, 2024
1 parent f43dbf2 commit b7214c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/e2e/specs/dashboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Overview Card`
});

await dashboardPage.open();
await page.waitForURL("**/dashboard/**");

//get the number of exposures count
const overviewCardSummary =
Expand Down
10 changes: 4 additions & 6 deletions src/e2e/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,10 @@ export const forceLoginAs = async (
await page.context().clearCookies();
await landingPage.open();
await landingPage.goToSignIn();
let visible = true;
try {
await expect(authPage.useDifferentEmailButton).toBeVisible();
} catch {
visible = false;
}
await page
.locator("//input[@type='password'] | //div/input[@type='email']")
.waitFor({ state: "visible" });
const visible = await authPage.useDifferentEmailButton.isVisible();
if (visible) {
await authPage.useDifferentEmailButton.click();
await page.waitForURL(/^(?!.*signin).*/);
Expand Down

0 comments on commit b7214c8

Please sign in to comment.