1import { defineConfig } from "@playwright/test";
2
3// Tailwind's esm-cache loader guard lives in the shared harness
4// (@alchemy.run/cloudflare-test-tools/e2e Playwright.ts imports TailwindNodeCompat.ts),
5// which every worker process loads before vite touches tailwind.
6
7export default defineConfig({
8 tsconfig: "../tsconfig.playwright.json",
9 testDir: "./test",
10 // Windows CI runs every fixture e2e concurrently; absorb runner flakiness.
11 retries: process.env.CI ? 2 : 0,
12 // A systemic failure (runner capacity, broken build) otherwise burns
13 // retries x timeout on every remaining spec — fail the suite fast.
14 maxFailures: process.env.CI ? 5 : 0,
15 timeout: 60_000,
16 expect: {
17 timeout: 10_000,
18 },
19 snapshotPathTemplate: "{testDir}/__snapshots__/{testFileName}/{arg}{ext}",
20 projects: [
21 {
22 name: "chromium",
23 use: {
24 browserName: "chromium",
25 colorScheme: "light",
26 deviceScaleFactor: 1,
27 viewport: { width: 1280, height: 720 },
28 },
29 },
30 ],
31});