Skip to content

Commit

Permalink
fix: Dashboard content E2E test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Sep 27, 2024
1 parent 68f1879 commit 013393d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/e2e/specs/dashboard/dashboard-content.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ 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 {
await checkAuthState(page);
} 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 ({
Expand Down

0 comments on commit 013393d

Please sign in to comment.