-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
44 lines (41 loc) · 905 Bytes
/
playwright.config.ts
File metadata and controls
44 lines (41 loc) · 905 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
39
40
41
42
43
44
import { type PlaywrightTestConfig, devices } from '@playwright/test'
const WEB_SERVER_PORT = 3000
const isRunningInCI = process.env.CI
const config: PlaywrightTestConfig = {
testDir: './e2e/specs',
outputDir: './e2e/results',
projects: [
{
name: 'Chrome',
testMatch: /.*\.spec\.ts/,
use: {
...devices['Desktop Chrome']
}
}
],
use: {
baseURL: `http://localhost:${WEB_SERVER_PORT}`,
bypassCSP: true,
trace: 'retain-on-failure',
video: 'retain-on-failure',
screenshot: 'only-on-failure'
},
webServer: {
command: 'pnpm run preview',
port: WEB_SERVER_PORT
},
reporter: [
isRunningInCI ? ['github'] : ['list'],
isRunningInCI
? ['@estruyf/github-actions-reporter', { useDetails: true, showError: true }]
: ['null'],
[
'html',
{
outputFolder: './e2e/report',
open: isRunningInCI ? 'never' : 'on-failure'
}
]
]
}
export default config