diff --git a/tests/config/playwright.config.ts b/tests/config/playwright.config.ts index 9534c9ac0a..9e19b4868c 100644 --- a/tests/config/playwright.config.ts +++ b/tests/config/playwright.config.ts @@ -1,4 +1,4 @@ -import { PlaywrightTestConfig, devices } from "@playwright/test"; +import { devices, PlaywrightTestConfig } from "@playwright/test"; import { addAliases } from "module-alias"; import * as path from "path"; @@ -17,6 +17,8 @@ addAliases({ const outputDir = path.join(__dirname, "..", "..", "test-results"); const testDir = path.join(__dirname, "..", "..", "apps/web/playwright"); +const DEFAULT_NAVIGATION_TIMEOUT = 5000; + const config: PlaywrightTestConfig = { forbidOnly: !!process.env.CI, retries: 1, @@ -45,7 +47,11 @@ const config: PlaywrightTestConfig = { { name: "chromium", testDir, - use: { ...devices["Desktop Chrome"] }, + use: { + ...devices["Desktop Chrome"], + /** If navigation takes more than this, then something's wrong, let's fail fast. */ + navigationTimeout: DEFAULT_NAVIGATION_TIMEOUT, + }, }, /* { name: "firefox",