import { defineConfig } from '@playwright/test'; // Phase 2 Plan 02-05 — PIPE-07 smoke test landed here. The spec under // tests/e2e/season1-loop.spec.ts exercises the full Season-1 loop // (load → Begin → plant → fast-forward → harvest → reveal → journal → // reload → persist) using FakeClock injection via the ?devtime=fake URL // flag (production-guarded by import.meta.env.PROD). // // webServer.timeout bumped to 60s to absorb Vite dev server's first-time // transform of the entry bundle (~2.2MB; typically <8s warm but can // exceed 30s cold on a fresh node_modules/.vite cache). // Phase 2 Plan 02-05 — Port 5273 chosen to avoid colliding with another // Vite project on the dev machine that's bound to the default 5173. // reuseExistingServer is intentionally false so the webServer always // starts fresh against this project's vite.config.ts (or default port // flag below) — `--port 5273 --strictPort` ensures we fail loudly if // the port is also taken rather than silently latching onto another app. const E2E_PORT = 5273; const E2E_BASE_URL = `http://localhost:${E2E_PORT}`; export default defineConfig({ testDir: 'tests/e2e', use: { baseURL: E2E_BASE_URL }, webServer: { command: `npm run dev -- --port ${E2E_PORT} --strictPort`, url: E2E_BASE_URL, reuseExistingServer: false, timeout: 60_000, }, });