-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
50 lines (47 loc) · 1.27 KB
/
playwright.config.ts
File metadata and controls
50 lines (47 loc) · 1.27 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
44
45
46
47
48
49
50
import { defineConfig, devices } from '@playwright/test'
const PORT = Number(process.env.PLAYWRIGHT_DEV_PORT ?? '3099')
if (!Number.isInteger(PORT) || PORT <= 0) {
throw new Error(`Invalid PLAYWRIGHT_DEV_PORT: ${process.env.PLAYWRIGHT_DEV_PORT ?? '3099'}`)
}
export default defineConfig({
testDir: './e2e',
timeout: 120_000,
expect: { timeout: 30_000 },
fullyParallel: false,
retries: 1,
workers: 1,
reporter: 'html',
use: {
baseURL: `http://localhost:${PORT}/`,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 15_000,
locale: 'en-US',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
launchOptions: {
args: [
'--enable-features=SharedArrayBuffer',
'--enable-experimental-web-platform-features',
'--use-gl=angle',
'--use-angle=swiftshader',
'--enable-webgl',
'--ignore-gpu-blocklist',
'--disable-gpu-sandbox',
],
},
},
},
],
webServer: {
command: `next dev --port ${PORT}`,
url: `http://localhost:${PORT}`,
reuseExistingServer: process.env.PLAYWRIGHT_REUSE_EXISTING_SERVER === '1',
timeout: 60_000,
},
})