-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
52 lines (50 loc) · 1.62 KB
/
Copy pathplaywright.config.ts
File metadata and controls
52 lines (50 loc) · 1.62 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, devices } from '@playwright/test'
/**
* Parallelism: each worker gets its own workspace/room (see e2eWorkspaceId in
* e2e/helpers.ts), so workers never meet over the shared local relay. The
* Nostr subset stays serial — dozens of concurrent connections from one IP is
* exactly what public relays throttle.
*/
const nostr = process.env.E2E_SIGNALING === 'nostr'
export default defineConfig({
testDir: './e2e',
// Keep wall-clock failure budget tight: a blocked UI (e.g. consent banner
// over Send) should fail in ~30–45s, not 90s × 2 retries × many tests.
timeout: 45_000,
expect: { timeout: 15_000 },
fullyParallel: !nostr,
workers: nostr ? 1 : process.env.CI ? 2 : 4,
// One retry on CI only: genuine regressions fail twice; local runs fail once.
retries: process.env.CI ? 1 : 0,
reporter: [['list'], ['html', { open: 'never' }]],
use: {
baseURL: 'http://127.0.0.1:17273',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
permissions: ['camera', 'microphone'],
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
launchOptions: {
chromiumSandbox: false,
args: [
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--disable-features=WebRtcHideLocalIpsWithMdns',
'--allow-insecure-localhost',
],
},
},
},
],
webServer: {
command: 'node server/test-server.mjs',
url: 'http://127.0.0.1:17273',
reuseExistingServer: false,
timeout: 120_000,
},
})