-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
31 lines (30 loc) · 1.18 KB
/
Copy pathplaywright.config.ts
File metadata and controls
31 lines (30 loc) · 1.18 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
import { defineConfig, devices } from '@playwright/test';
/**
* E2E config. `globalSetup` boots the relay (the process Playwright's `webServer` can't poll on an HTTP
* port); `webServer` runs the SvelteKit dev server; the session spec pairs its own device + fake daemon.
* The browser then drives the real page through the full stack.
*/
export default defineConfig({
testDir: './tests/e2e',
globalSetup: './tests/e2e/global-setup.ts',
timeout: 30_000,
expect: { timeout: 10_000 },
// All specs share one relay + Postgres + the single dev-login user, so run them serially (one worker)
// to avoid cross-file races on that shared state — mirrors the relay suite's `fileParallelism: false`.
fullyParallel: false,
workers: 1,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? 'list' : 'line',
use: {
baseURL: 'http://127.0.0.1:5173',
trace: 'on-first-retry',
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
webServer: {
command: 'pnpm exec vite dev --port 5173 --strictPort --host 127.0.0.1',
url: 'http://127.0.0.1:5173',
reuseExistingServer: !process.env.CI,
timeout: 60_000,
},
});