forked from primer/primitives
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
39 lines (35 loc) · 1.1 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
import {defineConfig} from '@playwright/test'
// eslint-disable-next-line import/no-nodejs-modules
import path from 'node:path'
export default defineConfig({
testDir: 'e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [
['line'],
process.env.CI ? ['blob'] : ['html', {open: 'never', outputFolder: path.join(__dirname, '.playwright/report')}],
[
'json',
{
outputFile: path.join(__dirname, '.playwright', 'results.json'),
},
],
],
// 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'),
use: {
baseURL: 'http://127.0.0.1:6006',
screenshot: 'only-on-failure',
viewport: {
// Large breakpoint
// @see https://primer.style/primitives/spacing#breakpoints
width: 1012,
height: 768,
},
},
})