-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.mjs
More file actions
49 lines (48 loc) · 1.78 KB
/
Copy pathplaywright.config.mjs
File metadata and controls
49 lines (48 loc) · 1.78 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
// Playwright config for the viewer's browser e2e suite. Uses
// Playwright's built-in webServer to spin up the static file server
// on the same port the developer-facing tab uses (8011), so manual
// browsing and CI runs share one URL convention.
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
testMatch: /.*\.spec\.mjs$/,
// Be tolerant of cold OpenNeuro S3 connections — first run pulls
// ~125 MB; subsequent runs hit the browser cache.
timeout: 90_000,
expect: { timeout: 30_000 },
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: [['list']],
use: {
baseURL: 'http://localhost:8011',
headless: true,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
// Expose window.gc() to the page so the RAPID-5 memory-leak
// gate can drive Joyee Cheung's tryGC retry pattern. V8's GC
// is async + lazy; without explicit triggering, the heap-diff
// signal is dominated by deferred GC noise, not real leaks.
launchOptions: { args: ['--js-flags=--expose-gc'] },
},
},
],
webServer: {
// Use a Node static server with Range-request support — the EDF/BDF
// range-fetch path needs RFC 7233 byte ranges for local fixtures
// (Python's built-in http.server ≤ 3.12 silently ignores Range and
// returns 200, which breaks HttpRange.rangeFetchSingle's byte-count
// validation against the F09 EDF+ test fixture).
command: 'node scripts/serve.mjs 8011',
url: 'http://localhost:8011/index.html',
reuseExistingServer: !process.env.CI,
stdout: 'ignore',
stderr: 'pipe',
},
});