-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
43 lines (41 loc) · 1.1 KB
/
playwright.config.ts
File metadata and controls
43 lines (41 loc) · 1.1 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
import { defineConfig, devices, type ReporterDescription } from '@playwright/test'
// See playwright.demo.config.ts for the full reporter rationale. We mirror
// the stack here so the MSW-mode default config produces the same live
// stdout signal and PR annotations as the demo/local configs.
const reporters: ReporterDescription[] = [
['list'],
['html'],
['./e2e/reporters/scenario-reporter.ts'],
]
if (process.env.GITHUB_ACTIONS === 'true') {
reporters.push(['github'])
}
export default defineConfig({
testDir: './e2e/tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: reporters,
timeout: 60_000,
expect: {
timeout: 10_000,
},
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npm run e2e:serve',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
})