diff --git a/e2e/_utils.ts b/e2e/_utils.ts index 88858fc1f..0d5dd8975 100644 --- a/e2e/_utils.ts +++ b/e2e/_utils.ts @@ -1,6 +1,13 @@ -import { Page } from "@playwright/test"; - +import { Page } from '@playwright/test'; export const clearLocalStorage = (page: Page) => { return page.evaluate(`window.localStorage.clear()`); -} \ No newline at end of file +}; + +export const defaultPageConfig = () => { + return { + extraHTTPHeaders: { + 'ngrok-skip-browser-warning': 'any-value', + }, + }; +}; diff --git a/e2e/authentication.spec.ts b/e2e/authentication.spec.ts index 0f4e72151..8e31e3ea1 100644 --- a/e2e/authentication.spec.ts +++ b/e2e/authentication.spec.ts @@ -1,12 +1,12 @@ import { test, expect, Page } from '@playwright/test'; import { faker } from '@faker-js/faker'; -import { clearLocalStorage } from './_utils'; +import { clearLocalStorage, defaultPageConfig } from './_utils'; let authPage: Page; test.describe('authentication', () => { test.beforeAll(async ({ browser }) => { - authPage = await browser.newPage(); + authPage = await browser.newPage({ ...defaultPageConfig() }); }); test.afterAll(async () => { await authPage.close(); @@ -98,7 +98,7 @@ test.describe('authentication', () => { test.describe('reset password', () => { test.beforeAll(async ({ browser }) => { - authPage = await browser.newPage(); + authPage = await browser.newPage({ ...defaultPageConfig() }); }); test.afterAll(async () => { await authPage.close(); diff --git a/e2e/onboarding.spec.ts b/e2e/onboarding.spec.ts index 1d25cd9bd..e80ae7f19 100644 --- a/e2e/onboarding.spec.ts +++ b/e2e/onboarding.spec.ts @@ -1,12 +1,13 @@ import { test, expect, Page } from '@playwright/test'; import { faker } from '@faker-js/faker'; +import { defaultPageConfig } from './_utils'; let authPage: Page; let businessLegalName: string = faker.company.name(); test.describe('onboarding', () => { test.beforeAll(async ({ browser }) => { - authPage = await browser.newPage(); + authPage = await browser.newPage({ ...defaultPageConfig() }); await authPage.goto('/auth/register'); const form = authPage.locator('form');