-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (37 loc) · 1020 Bytes
/
playwright.config.ts
File metadata and controls
39 lines (37 loc) · 1020 Bytes
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
import {defineConfig} from '@playwright/test';
const isCI = !!process.env.CI;
export default defineConfig({
testMatch: /\.spec\.ts$/,
retries: isCI ? 1 : 0,
reporter: [['html', {open: 'on-failure', outputFolder: 'playwright-report'}]],
// 3 workers in CI (ubuntu-latest: 2 vCPUs, 7GB RAM).
// Each worker spawns a Vite dev server + Chromium. Increase with caution.
workers: process.env.CI ? 3 : 4,
fullyParallel: true,
timeout: 60 * 1000,
use: {
// Capture screenshot on failure
screenshot: 'only-on-failure',
// Record trace on first retry (helps debug flaky tests)
trace: 'on-first-retry',
},
projects: [
{
name: 'skeleton',
testDir: './e2e/specs/skeleton',
},
{
name: 'smoke',
testDir: './e2e/specs/smoke',
},
{
name: 'new-cookies',
testDir: './e2e/specs/new-cookies',
},
{
// TODO: remove once new cookies are rolled out
name: 'old-cookies',
testDir: './e2e/specs/old-cookies',
},
],
});