-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
41 lines (39 loc) · 1.05 KB
/
Copy pathplaywright.config.js
File metadata and controls
41 lines (39 loc) · 1.05 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
const { defineConfig, devices } = require('@playwright/test');
const port = Number(process.env.PLAYWRIGHT_PORT || 41817);
const baseURL = `http://127.0.0.1:${port}`;
const desktopViewport = { width: 1440, height: 960 };
module.exports = defineConfig({
testDir: './tests',
testIgnore: ['**/helpers/**'],
timeout: 30_000,
expect: {
timeout: 5_000
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [['list'], ['html', { open: 'never' }]],
use: {
baseURL,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
viewport: desktopViewport
},
webServer: {
command: `npm run build:test && node scripts/serve_test_site.js ${port} _site`,
url: baseURL,
reuseExistingServer: false,
timeout: 180_000
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: desktopViewport
}
}
]
});