-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.ts
101 lines (87 loc) · 2.68 KB
/
playwright.config.ts
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { PlaywrightTestConfig } from '@playwright/test';
import blinkConfig from './config';
const config: PlaywrightTestConfig & { args: string[]; headless: boolean } = {
// globalSetup: './global-setup',
// globalTeardown: './global-teardown',
args: ['--disable-features=IsolateOrigins,site-per-process'],
headless: false,
use: {
// Artifacts
headless: blinkConfig.HEADLESS,
viewport: { width: blinkConfig.BROWSER_WIDTH, height: blinkConfig.BROWSER_HEIGHT },
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
video: 'retain-on-failure',
trace: {
mode: 'retain-on-failure',
screenshots: true,
snapshots: true,
sources: true,
},
actionTimeout: blinkConfig.ACTION_TIMEOUT * 1000 * blinkConfig.CUSTOM_TIMEOUT_MULTIPLY,
navigationTimeout: blinkConfig.NAVIGATION_TIMEOUT * 1000 * blinkConfig.CUSTOM_TIMEOUT_MULTIPLY,
browserName: blinkConfig.BROWSER,
permissions: ['clipboard-read', 'clipboard-write'],
},
timeout: blinkConfig.TEST_TIMEOUT * 60 * 1000 * blinkConfig.CUSTOM_TIMEOUT_MULTIPLY,
expect: { timeout: 15 * 1000 }, // 15 seconds
retries: blinkConfig.RETRIES,
workers: blinkConfig.WORKERS,
repeatEach: blinkConfig.REPEAT_EACH,
// testMatch: [''],
testDir: 'tests',
reporter: [
['list'],
[
'allure-playwright',
{
suiteTitle: true,
environmentInfo: {
NODE_VERSION: process.version,
OS: process.platform,
IS_HEADLESS: process.env.HEADLESS,
BROWSER: process.env.BROWSER,
},
},
],
['json', { outputFile: 'test-results.json' }],
['junit', { outputFile: 'test-results.xml' }],
['html', { open: 'never' }],
],
// outputDir: './reports',
// reporter: 'line',
// outputDir: path.dirname('./ts-results'),
// Two reporters for CI:
// - concise "dot"
// - comprehensive json report
// reporter: !process.env.CI
// ? // Default 'list' reporter for the terminal
// 'list'
// : // Two reporters for CI:
// // - concise "dot"
// // - comprehensive json report
// [['dot'], ['json', { outputFile: 'test-results.json' }], ['junit']],
// projects: [
// {
// name: 'Chromium',
// use: {
// browserName: 'chromium',
// // Context options
// viewport: { width: 1920, height: 1020 },
// },
// },
// {
// name: 'Firefox',
// use: {
// browserName: 'firefox',
// // Context options
// viewport: { width: 1920, height: 1020 },
// },
// },
// {
// name: 'WebKit',
// use: { browserName: 'webkit', viewport: { width: 600, height: 800 } },
// },
// ],
};
export default config;