1import { defineConfig } from "@playwright/test";
2
3export default defineConfig({
4 tsconfig: "../tsconfig.playwright.json",
5 testDir: "./test",
6 timeout: 60_000,
7 // The dev-mode smoke test is flaky on CI (it also fails intermittently on
8 // main, e.g. runs 30733973174/30733916976): this fixture pins vite 7 (for
9 // @solidjs/start) while the workspace catalog resolves the cloudflare
10 // plugins against vite 8, so the vite-8 dependency scanner crashes on the
11 // vite-7-resolved environment config ("Failed to run dependency scan ...
12 // reading 'input'"). Dependencies are then discovered lazily on first
13 // request, and the resulting "optimized dependencies changed" full reloads
14 // race the first page load. The server reaches steady state after those
15 // reloads, so a retry against the same worker-scoped server is reliable.
16 retries: process.env.CI ? 2 : 0,
17 // A systemic failure (runner capacity, broken build) otherwise burns
18 // retries x timeout on every remaining spec — fail the suite fast.
19 maxFailures: process.env.CI ? 5 : 0,
20 expect: {
21 timeout: 10_000,
22 },
23 snapshotPathTemplate: "{testDir}/__snapshots__/{testFileName}/{arg}{ext}",
24 projects: [
25 {
26 name: "chromium",
27 use: {
28 browserName: "chromium",
29 colorScheme: "light",
30 deviceScaleFactor: 1,
31 viewport: { width: 1280, height: 720 },
32 },
33 },
34 ],
35});