summaryrefslogtreecommitdiff
path: root/e2e/playwright.config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'e2e/playwright.config.ts')
-rw-r--r--e2e/playwright.config.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts
new file mode 100644
index 0000000..c928a10
--- /dev/null
+++ b/e2e/playwright.config.ts
@@ -0,0 +1,30 @@
+import { defineConfig, type TestConfig } from '@playwright/test';
+
+/**
+ * E2E config for X-Haven (PLAN.md Phase 7).
+ *
+ * Each test boots its own real Dart game server (fresh saves dir, free port)
+ * through the `table` fixture in `helpers/table.ts` — there is no shared
+ * `webServer` because the resilience specs restart the server mid-test and
+ * every spec needs isolated state.
+ */
+const config: TestConfig = {
+ testDir: './tests',
+ timeout: 180_000,
+ // The server boot + a full round is the slow part; give the whole suite
+ // room without making a hang look like a pass.
+ expect: { timeout: 10_000 },
+ // One worker: the specs drive real browser tabs against one server each,
+ // and a single worker keeps the ports and temp dirs from colliding.
+ workers: 1,
+ retries: 0,
+ reporter: [['list']],
+ use: {
+ // No baseURL: the server port is chosen per test.
+ viewport: { width: 400, height: 820 },
+ // Keep the failure artifacts small (we drive full state over WS).
+ trace: 'retain-on-failure',
+ },
+};
+
+export default defineConfig(config);