-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathplaywright.config.js
More file actions
66 lines (64 loc) · 1.75 KB
/
playwright.config.js
File metadata and controls
66 lines (64 loc) · 1.75 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
61
62
63
64
65
66
import { defineConfig, devices } from '@playwright/test';
import 'dotenv/config';
const isCI = !!process.env.CI;
const useCtrf = isCI && !!process.env.USE_CTRF; // toggle CTRF explicitly in CI
export default defineConfig({
testDir: './_playwright-tests/',
fullyParallel: true,
forbidOnly: isCI,
retries: isCI ? 2 : 0,
workers: 1,
reporter: isCI
? [
['html', { outputFolder: 'playwright-report' }],
useCtrf
? [
'playwright-ctrf-json-reporter',
{
outputDir: 'playwright-ctrf',
outputFile: 'playwright-ctrf.json',
},
]
: ['json', { outputFile: 'playwright-ctrf/playwright-ctrf.json' }],
['@currents/playwright'],
]
: 'list',
globalTimeout: 35 * 60 * 1000, // 35 min
timeout: 90_000,
globalSetup: './_playwright-tests/helpers/globalSetup',
globalTeardown: './_playwright-tests/helpers/globalTeardown',
use: {
actionTimeout: 90_000,
navigationTimeout: 90_000,
headless: true,
baseURL: process.env.BASE_URL,
launchOptions: { args: ['--disable-http-cache'] },
video: 'retain-on-failure',
trace: 'on',
ignoreHTTPSErrors: true,
launchOptions: { args: ['--disable-http-cache'] },
viewport: null,
...(process.env.INTEGRATION === 'true'
? {
...(process.env.PROXY
? {
proxy: {
server: process.env.PROXY,
},
}
: {}),
}
: {}),
},
projects: [
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: '.auth/admin_user.json',
},
dependencies: ['setup'],
},
],
});