-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
56 lines (51 loc) · 1.33 KB
/
Copy pathplaywright.config.js
File metadata and controls
56 lines (51 loc) · 1.33 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
// playwright.config.js
const { defineConfig } = require('@playwright/test');
const Config = require('./src/utils/configManager');
module.exports = defineConfig({
testDir: './tests',
timeout: 30_000,
expect: { timeout: 5_000 },
// Global defaults
use: {
baseURL: Config.get('baseURL'),
headless: false,
// IMPORTANT: Let the real browser window size apply
viewport: null,
screenshot: 'only-on-failure',
video: 'retain-on-failure',
trace: 'retain-on-failure',
},
// Per-project overrides
projects: [
{
name: 'Chromium',
use: {
browserName: 'chromium',
launchOptions: {
args: ['--start-maximized'] // true maximize in headful Chromium
}
}
},
{
name: 'Firefox',
use: {
browserName: 'firefox',
viewport: { width: 1920, height: 1080 }
}
},
// Uncomment if you run WebKit and want a big viewport there too
// {
// name: 'WebKit',
// use: {
// browserName: 'webkit',
// viewport: { width: 1920, height: 1080 }
// }
// }
],
reporter: [
['list', { printSteps: true }],
['html', { outputFolder: 'reports/html-report', open: 'never' }],
['allure-playwright', { outputFolder: 'allure-results' }],
['junit', { outputFile: 'test-results/results.xml' }]
]
});