File
Blob: tests/e2e/playwright.config.ts
| 1 | import { defineConfig, devices } from "@playwright/test"; |
| 2 | |
| 3 | // E2E suite spins up an *isolated* `vite dev` per run (see global-setup.ts + |
| 4 | // harness.ts). The user's own dev server stays untouched — we get a fresh |
| 5 | // tempdir for D1 state, a free port, and a clean teardown after the suite. |
| 6 | // |
| 7 | // Borrowed pattern: anvil's tests/integration/queue-runner/harness.ts. |
| 8 | // |
| 9 | // Set TESSERA_E2E_PRESERVE=1 to keep the tempdir + logs after a failure. |
| 10 | export default defineConfig({ |
| 11 | testDir: "./specs", |
| 12 | fullyParallel: false, |
| 13 | workers: 1, |
| 14 | retries: 0, |
| 15 | timeout: 120_000, |
| 16 | globalTimeout: 600_000, |
| 17 | reporter: process.env.CI ? "list" : [["list"], ["html", { open: "never" }]], |
| 18 | globalSetup: "./global-setup.ts", |
| 19 | use: { |
| 20 | // baseURL is populated by global-setup.ts after the ephemeral dev |
| 21 | // server is ready. Falling back to a fixed default would let specs run |
| 22 | // against the user's own dev server by accident. |
| 23 | baseURL: process.env.TESSERA_E2E_BASE_URL, |
| 24 | trace: "on-first-retry", |
| 25 | screenshot: "only-on-failure", |
| 26 | }, |
| 27 | projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }], |
| 28 | }); |