addressing pr feedbacks
|
@ -7,7 +7,7 @@ on:
|
|||
environment:
|
||||
description: 'Environment to run the e2e against'
|
||||
required: false
|
||||
default: 'dev'
|
||||
default: 'stage'
|
||||
type: choice
|
||||
options:
|
||||
- stage
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
|
||||
- name: Run Playwright tests - ${{ inputs.environment != null && inputs.environment || 'stage' }}
|
||||
if: github.actor != 'dependabot[bot]'
|
||||
run: npm run e2e:${{ inputs.type != null && inputs.type || '' }}
|
||||
run: npm run e2e:${{ inputs.type }}
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
E2E_TEST_ENV: ${{ inputs.environment != null && inputs.environment || 'stage' }}
|
||||
|
@ -63,6 +63,7 @@ jobs:
|
|||
E2E_TEST_ACCOUNT_EMAIL: ${{ secrets.E2E_TEST_ACCOUNT_EMAIL }}
|
||||
E2E_TEST_ACCOUNT_PASSWORD: ${{ secrets.E2E_TEST_ACCOUNT_PASSWORD }}
|
||||
E2E_START_LOCAL_SERVER: 'false'
|
||||
E2E_COMMAND_SUFFIX: ${{ inputs.type }}
|
||||
ADMINS: ${{ secrets.ADMINS }}
|
||||
FXA_ENABLED: true
|
||||
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
"e2e": "playwright test src/e2e/",
|
||||
"e2e:debug": "playwright test src/e2e/ --ui",
|
||||
"e2e:smoke": "playwright test src/e2e/ --grep @smoke",
|
||||
"e2e:ui": "playwright test src/e2e/ --grep @ui",
|
||||
"e2e:all": "playwright test src/e2e/ --grep ''",
|
||||
"db:migrate": "node -r dotenv/config node_modules/knex/bin/cli.js migrate:latest --knexfile src/db/knexfile.js",
|
||||
"db:rollback": "node -r dotenv/config node_modules/knex/bin/cli.js migrate:rollback --knexfile src/db/knexfile.js",
|
||||
"prepare": "husky install",
|
||||
|
|
|
@ -38,7 +38,7 @@ async function maybeStartWebServer(): Promise<void> {
|
|||
if (process.env.E2E_START_LOCAL_SERVER === "true") {
|
||||
console.log("[e2e] - Starting the local web server...");
|
||||
|
||||
// define port and timeout
|
||||
// define timeout
|
||||
const timeout = 1_800_000;
|
||||
|
||||
// start the server
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import { test, expect } from "../fixtures/basePage.js";
|
||||
|
||||
test.describe(`${process.env.E2E_TEST_ENV} Authentication flow verification @smoke`, () => {
|
||||
test.describe(`${process.env.E2E_TEST_ENV} - Authentication flow verification @smoke`, () => {
|
||||
test.beforeEach(async ({ landingPage }) => {
|
||||
await landingPage.open();
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ import { test, expect } from "../fixtures/basePage.js";
|
|||
|
||||
// bypass login
|
||||
test.use({ storageState: "./e2e/storageState.json" });
|
||||
test.describe(`${process.env.E2E_TEST_ENV} Breaches Dashboard - Headers`, () => {
|
||||
test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Headers`, () => {
|
||||
test("Verify that the site header is displayed correctly for signed in users", async ({
|
||||
dataBreachPage,
|
||||
}) => {
|
||||
|
@ -49,7 +49,7 @@ test.describe(`${process.env.E2E_TEST_ENV} Breaches Dashboard - Headers`, () =>
|
|||
await page.waitForLoadState("networkidle");
|
||||
await dataBreachPage.dataBreachesNavbarProfile.click();
|
||||
|
||||
// verify mnanage your ff account link, settings option, help and support option, sign out option
|
||||
// verify manage your Mozilla account link, settings option, help and support option, sign out option
|
||||
// menu is open
|
||||
expect(await dataBreachPage.profileMenuExpanded()).toBeTruthy();
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { checkAuthState } from "../utils/helpers.js";
|
|||
|
||||
// bypass login
|
||||
test.use({ storageState: "./e2e/storageState.json" });
|
||||
test.describe(`${process.env.E2E_TEST_ENV} Breaches Dashboard - Headers`, () => {
|
||||
test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Headers`, () => {
|
||||
test.beforeEach(async ({ dashboardPage, page }) => {
|
||||
await dashboardPage.open();
|
||||
|
||||
|
@ -61,7 +61,7 @@ test.describe(`${process.env.E2E_TEST_ENV} Breaches Dashboard - Headers`, () =>
|
|||
});
|
||||
});
|
||||
|
||||
test.describe(`${process.env.E2E_TEST_ENV} Breaches Dashboard - Headers - Outside of U.S.`, () => {
|
||||
test.describe(`${process.env.E2E_TEST_ENV} - Breaches Dashboard - Headers - Outside of U.S.`, () => {
|
||||
test("Verify that the site header and navigation bar is displayed correctly", async ({
|
||||
context,
|
||||
}) => {
|
||||
|
|
До Ширина: | Высота: | Размер: 5.6 KiB |
|
@ -8,7 +8,7 @@ import {
|
|||
waitForUrlOrTimeout,
|
||||
} from "../utils/helpers.js";
|
||||
|
||||
test.describe(`${process.env.E2E_TEST_ENV} Landing Page element verification`, () => {
|
||||
test.describe(`${process.env.E2E_TEST_ENV} - Landing Page element verification`, () => {
|
||||
test.beforeEach(async ({ landingPage }) => {
|
||||
await landingPage.open();
|
||||
});
|
||||
|
@ -51,7 +51,7 @@ test.describe(`${process.env.E2E_TEST_ENV} Landing Page element verification`, (
|
|||
await expect(landingPage.seeIfDataBreachSec).toBeVisible();
|
||||
});
|
||||
|
||||
test("Verify that the site footer is displayed correctly @uiregression", async ({
|
||||
test.only("Verify that the site footer is displayed correctly @ui", async ({
|
||||
landingPage,
|
||||
}) => {
|
||||
// clear any possible banner
|
||||
|
@ -72,7 +72,7 @@ test.describe(`${process.env.E2E_TEST_ENV} Landing Page element verification`, (
|
|||
});
|
||||
});
|
||||
|
||||
test.describe(`${process.env.E2E_TEST_ENV} Landing Page Functionality Verification`, () => {
|
||||
test.describe(`${process.env.E2E_TEST_ENV} - Landing Page Functionality Verification`, () => {
|
||||
test("Verify landing page elements - free scan", async ({
|
||||
landingPage,
|
||||
scanPage,
|
||||
|
|
До Ширина: | Высота: | Размер: 6.5 KiB |
До Ширина: | Высота: | Размер: 5.9 KiB |
До Ширина: | Высота: | Размер: 7.1 KiB |
До Ширина: | Высота: | Размер: 7.1 KiB |
До Ширина: | Высота: | Размер: 6.6 KiB После Ширина: | Высота: | Размер: 6.8 KiB |
До Ширина: | Высота: | Размер: 6.3 KiB После Ширина: | Высота: | Размер: 14 KiB |
До Ширина: | Высота: | Размер: 7.1 KiB После Ширина: | Высота: | Размер: 8.0 KiB |
До Ширина: | Высота: | Размер: 7.7 KiB После Ширина: | Высота: | Размер: 22 KiB |
|
@ -47,7 +47,7 @@ test.describe(`${process.env.E2E_TEST_ENV} Settings Page`, () => {
|
|||
}).toPass();
|
||||
|
||||
await expect(async () => {
|
||||
// select "send asll breach alerts to the primary email address"
|
||||
// select "send all breach alerts to the primary email address"
|
||||
await settingsPage.sendToPrimaryEmailRadioButton.click();
|
||||
|
||||
// verify option is selected
|
||||
|
|
|
@ -56,13 +56,14 @@ export const waitForUrlOrTimeout = async (
|
|||
urlSubstring: string,
|
||||
timeout: number,
|
||||
) => {
|
||||
const tries = 0;
|
||||
let tries = 0;
|
||||
const startTime = Date.now();
|
||||
while (Date.now() - startTime > timeout || tries < 10) {
|
||||
if (page.url().includes(urlSubstring)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
tries++;
|
||||
await delay(500);
|
||||
}
|
||||
};
|
||||
|
|