-
-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathplaywright.config.js
More file actions
38 lines (32 loc) · 997 Bytes
/
Copy pathplaywright.config.js
File metadata and controls
38 lines (32 loc) · 997 Bytes
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
'use strict';
const { defineConfig } = require('@playwright/test');
module.exports = defineConfig({
testDir: './tests/specs',
timeout: 120_000,
// Dynamic port allocation per worker (see fixtures/chrome-extension.js)
// allows parallel execution across test files.
// Tests within a file run sequentially (they share mock state).
workers: process.env.CI ? 2 : 4,
fullyParallel: false,
retries: process.env.CI ? 1 : 0,
reporter: [
['list'],
...(process.env.CI ? [
['github'],
['junit', { outputFile: 'test-results/junit.xml' }],
['html', { outputFolder: 'playwright-report', open: 'never' }],
] : []),
],
projects: [
{
name: 'chrome',
testMatch: '**/chrome/**/*.test.js',
// Chrome binary is specified via executablePath in the test's beforeAll.
// CHROME_BIN env var overrides the default path for CI environments.
},
{
name: 'firefox',
testMatch: '**/firefox/**/*.test.js',
},
],
});