Skip to content

Commit

Permalink
chore: Run E2E tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Sep 2, 2024
1 parent edd158c commit 7261f97
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export default defineConfig({
/* Retry on CI only */
retries: process.env.CI ? 1 : 0,

/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Use all of the available wokers in CI and use default locally. */
workers: process.env.CI ? "100%" : undefined,

/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? [['github'], ['html']] : 'html',
Expand Down
16 changes: 16 additions & 0 deletions src/e2e/specs/error.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { test, expect } from "../fixtures/basePage.js";

test.describe(`${process.env.E2E_TEST_ENV} - Verify Error Pages Functionality`, () => {
test("Verify that the 404 page shows up on non-existent pages @smoke", async ({
page,
}) => {
await page.goto("/non-existent-page/");
await expect(
page.locator("h1").getByText("⁨404⁩ Page not found"),
).toBeVisible();
});
});
10 changes: 0 additions & 10 deletions src/e2e/specs/landing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
getVerificationCode,
} from "../utils/helpers.js";

test.describe.configure({ mode: "parallel" });
test.describe.skip(
`${process.env.E2E_TEST_ENV} - Verify the Landing Page content`,
() => {
Expand Down Expand Up @@ -402,12 +401,3 @@ test.describe.skip(
});
},
);

test("Verify that the 404 page shows up on non-existent pages @smoke", async ({
page,
}) => {
await page.goto("/non-existent-page/");
await expect(
page.locator("h1").getByText("⁨404⁩ Page not found"),
).toBeVisible();
});

0 comments on commit 7261f97

Please sign in to comment.