From 2695f0595ab6cd96a6f66bcb86890841e9263cb6 Mon Sep 17 00:00:00 2001 From: Mukhamediyar Kudaikulov Date: Sat, 13 Jul 2024 04:12:44 -0700 Subject: [PATCH] made locator more precise, made data breaches not use storageState --- src/e2e/pages/dashBoardPage.ts | 4 +++- src/e2e/specs/dashboard.spec.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/e2e/pages/dashBoardPage.ts b/src/e2e/pages/dashBoardPage.ts index 25f5939df65..80cd54082bb 100644 --- a/src/e2e/pages/dashBoardPage.ts +++ b/src/e2e/pages/dashBoardPage.ts @@ -241,7 +241,9 @@ export class DashboardPage { this.faqsPageLink = page.getByTitle("Frequently asked questions").first(); //upsell button - this.upsellScreenButton = page.getByText(/Let’s (keep going|fix it)/); + this.upsellScreenButton = page + .locator("a") + .getByText(/Let’s (keep going|fix it)/); this.overviewCard = page.locator("[class*='DashboardTopBanner_container']"); this.overviewCardSummary = page.locator( "[aria-label='Dashboard summary'] > div > p", diff --git a/src/e2e/specs/dashboard.spec.ts b/src/e2e/specs/dashboard.spec.ts index a72dba31d56..98c4668a643 100644 --- a/src/e2e/specs/dashboard.spec.ts +++ b/src/e2e/specs/dashboard.spec.ts @@ -720,6 +720,8 @@ test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Navigation`, ( }); test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Data Breaches`, () => { + test.use({ storageState: { cookies: [], origins: [] } }); + test.beforeEach(async ({ landingPage, page, authPage }) => { const emailToUse = process.env .E2E_TEST_ACCOUNT_EMAIL_EXPOSURES_STARTED as string;