-
-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathplaywright.config.js
More file actions
46 lines (44 loc) · 1.06 KB
/
Copy pathplaywright.config.js
File metadata and controls
46 lines (44 loc) · 1.06 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
const { defineConfig, devices } = require('@playwright/test');
const PORT = Number(process.env.MARKDOWN_VIEWER_TEST_PORT || 4173);
const HOST = '127.0.0.1';
const browserChannel = process.env.PLAYWRIGHT_CHANNEL || undefined;
module.exports = defineConfig({
testDir: './tests/e2e',
timeout: 60_000,
expect: {
timeout: 15_000
},
fullyParallel: false,
reporter: [['list'], ['html', { open: 'never' }]],
webServer: {
command: 'node tests/helpers/static-server.mjs',
url: `http://${HOST}:${PORT}/`,
reuseExistingServer: true,
stdout: 'pipe',
stderr: 'pipe'
},
use: {
baseURL: `http://${HOST}:${PORT}`,
serviceWorkers: 'block',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
channel: browserChannel
}
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] }
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] }
}
]
});