blob: c928a10b40d454ac0980c11b415ffc940a8ac8f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
|