-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
52 lines (50 loc) · 1.63 KB
/
playwright.config.ts
File metadata and controls
52 lines (50 loc) · 1.63 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { defineConfig } from '@playwright/test'
const serverPort = 3320
const clientPort = 4173
const baseURL = `http://127.0.0.1:${clientPort}`
export default defineConfig({
testDir: './tests/e2e',
timeout: 45_000,
fullyParallel: false,
workers: 1,
// One retry on CI to absorb cold-runner timing flakes (e.g. the
// a11y-mirror→render→announce cycle in full-stack-dashboard.spec.ts).
// Local stays at 0 retries so flake regressions surface immediately.
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [['line'], ['html', { open: 'never' }]] : 'list',
use: {
baseURL,
// Align with thin-client resize → full-stack-dashboard layout used by canvas hit coordinates below.
viewport: { width: 1280, height: 820 },
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
webServer: [
{
command: 'npm run server',
cwd: 'demos/full-stack-dashboard',
env: {
...process.env,
GEOMETRA_FULL_STACK_PORT: String(serverPort),
GEOMETRA_FULL_STACK_CLIENT_ORIGIN: `${baseURL}/`,
// Stable canvas hit targets in tests/e2e (no default toast consuming banner height).
GEOMETRA_E2E: '1',
},
port: serverPort,
timeout: 30_000,
reuseExistingServer: false,
},
{
command: `npm run client -- --host 127.0.0.1 --port ${clientPort} --strictPort`,
cwd: 'demos/full-stack-dashboard',
env: {
...process.env,
VITE_GEOMETRA_WS_URL: `ws://127.0.0.1:${serverPort}`,
},
port: clientPort,
timeout: 30_000,
reuseExistingServer: false,
},
],
})