forked from primer/react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
40 lines (35 loc) · 1.07 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
import path from 'node:path'
import {Config} from '@playwright/test'
import './e2e/matchers/toHaveNoViolations'
const config: Config = {
// https://playwright.dev/docs/api/class-testconfig#test-config-test-dir
testDir: path.join(__dirname, 'e2e'),
testIgnore: ['**/matchers/**', '**/test-helpers/**'],
testMatch: '**/*.test.ts',
// https://playwright.dev/docs/api/class-testconfig#test-config-timeout
timeout: 1000 * 15,
// https://playwright.dev/docs/api/class-testconfig#test-config-output-dir
outputDir: path.join(__dirname, '.playwright', 'results'),
snapshotDir: path.join(__dirname, '.playwright', 'snapshots'),
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
use: {
screenshot: 'only-on-failure'
},
expect: {
toHaveScreenshot: {
animations: 'disabled'
}
},
reporter: [
['line'],
['html', {open: 'never', outputFolder: path.join(__dirname, '.playwright/report')}],
[
'json',
{
outputFile: path.join(__dirname, '.playwright', 'results.json')
}
]
]
}
export default config