-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
49 lines (45 loc) · 1.67 KB
/
Copy pathplaywright.config.ts
File metadata and controls
49 lines (45 loc) · 1.67 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
import { defineConfig, devices } from '@playwright/test';
const ALL_PROJECTS = [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
];
// PLAYWRIGHT_PROJECTS=chromium,firefox limits the matrix. Empty or unset
// runs every project. Local dev sets chromium, release.yml installs all.
const requested = process.env.PLAYWRIGHT_PROJECTS?.split(',')
.map((s) => s.trim())
.filter(Boolean);
const projects = requested?.length
? ALL_PROJECTS.filter((p) => requested.includes(p.name))
: ALL_PROJECTS;
export default defineConfig({
testDir: './packages/ui/tests/e2e',
/**
* 90s, not the 30s default.
*
* The axe passes mount the whole demo (54 components, 69 cards) and scan it in
* both themes. Isolated they take 10-12s, but the matrix runs three browsers
* over the same machine and contention triples that: a run was observed at
* 29.1s against the 30s ceiling, and adding one demo card was enough to tip
* `addStyleTag` in the practitioner spec over it. That failure reads as a
* theming or a11y bug and is neither, which is the expensive part. Raise the
* ceiling rather than trim the coverage that makes these the slow ones.
*/
timeout: 90_000,
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI ? 'github' : 'list',
use: {
baseURL: 'http://localhost:3001',
trace: 'on-first-retry',
},
webServer: {
command: 'bun run preview',
url: 'http://localhost:3001',
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
projects,
});