-
Notifications
You must be signed in to change notification settings - Fork 390
Expand file tree
/
Copy pathplaywright.config.js
More file actions
42 lines (38 loc) · 1.08 KB
/
Copy pathplaywright.config.js
File metadata and controls
42 lines (38 loc) · 1.08 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
const { defineConfig, devices } = require('@playwright/test');
module.exports = defineConfig({
testDir: './tests/ui/integration',
testMatch: '**/*.spec.js',
timeout: 60_000,
expect: { timeout: 10_000 },
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
// CI containers report the host's CPU count rather than the executor's
// cgroup limit, so Playwright's default (cores / 2) massively oversubscribes
// the 4-vCPU CircleCI executor and the run hangs. Pin workers to match it.
workers: process.env.CI ? 4 : undefined,
reporter: process.env.CI
? [
['list'],
['html', { open: 'never' }],
['junit', { outputFile: 'test-results/junit.xml' }],
]
: 'list',
use: {
baseURL: 'http://localhost:5000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
],
webServer: {
command: 'BROWSER=none pnpm start',
port: 5000,
reuseExistingServer: true,
timeout: 120_000,
},
});