diff --git a/src/e2e/specs/dashboard/dashboard-content.spec.ts b/src/e2e/specs/dashboard/dashboard-content.spec.ts index bf97a022676..88e9fc04812 100644 --- a/src/e2e/specs/dashboard/dashboard-content.spec.ts +++ b/src/e2e/specs/dashboard/dashboard-content.spec.ts @@ -9,7 +9,7 @@ import { checkAuthState } from "../../utils/helpers.js"; test.use({ storageState: "./e2e/storageState.json" }); test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Content @smoke`, () => { - test.beforeEach(async ({ dashboardPage, page }) => { + test.beforeEach(async ({ dashboardPage, welcomePage, page }) => { await dashboardPage.open(); try { @@ -17,6 +17,15 @@ test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Content @smoke } catch { console.log("[E2E_LOG] - No fxa auth required, proceeding..."); } + + // if we landed on the welcome flow a new user who is eligible for premium + // and needs to go through their first scan + const isWelcomeFlow = + page.url() === `${process.env.E2E_TEST_BASE_URL}/user/welcome`; + if (isWelcomeFlow) { + expect(page.url()).toContain("/user/welcome"); + await welcomePage.goThroughFirstScan({ skipLoader: true }); + } }); test("Verify that the exposure list contains action needed", async ({