Repository navigation
Expand file tree
/
Copy pathplaywright.config.js
More file actions
60 lines (56 loc) · 1.57 KB
/
Copy pathplaywright.config.js
File metadata and controls
60 lines (56 loc) · 1.57 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
50
51
52
53
54
55
56
57
58
59
60
const { defineConfig, devices } = require('@playwright/test');
// Keep in sync with `port` in tests/config.test.yml.
const baseURL = 'http://localhost:8181';
// Keep in sync with `port` in tests/config.compat.yml.
const compatURL = 'http://localhost:8182';
module.exports = defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
timeout: 60 * 1000,
reporter: process.env.CI ? [['html'], ['github']] : 'html',
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
permissions: ['clipboard-read', 'clipboard-write'],
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: [
{
// release build: every test opens the database, and the KDF takes seconds
// in a debug build
command: 'cargo run --release -- --config ./tests/config.test.yml',
url: baseURL,
reuseExistingServer: !process.env.CI,
cwd: process.cwd(),
timeout: 300 * 1000,
stdout: 'pipe',
stderr: 'pipe',
env: {
RUST_LOG: 'info',
},
},
{
// the compatibility specs write to the database, so they get their own
// instance on a copy of the fixture
command: 'cargo run --release -- --config ./tests/config.compat.yml',
url: compatURL,
reuseExistingServer: !process.env.CI,
cwd: process.cwd(),
timeout: 300 * 1000,
stdout: 'pipe',
stderr: 'pipe',
env: {
RUST_LOG: 'info',
},
},
],
});