-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplaywright.config.ts
49 lines (49 loc) · 1.19 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
41
42
43
44
45
46
47
48
49
import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './tests',
timeout: 30 * 1000,
expect: {
timeout: 5000,
},
fullyParallel: true,
retries: process.env.CI ? 1 : 0,
workers: 1,
forbidOnly: !!process.env.CI,
reporter: [['list'], ['dot'], ['html']],
use: {
headless: !!process.env.CI,
actionTimeout: 0,
baseURL: 'http://localhost:3000',
screenshot: 'only-on-failure',
video: 'on-first-retry',
trace: 'on-first-retry',
contextOptions: {
recordVideo: {
dir: 'videos/',
size: { width: 640, height: 480 },
},
},
},
// start local web server before tests
webServer: [
{
command: 'pnpm start:server',
url: 'http://localhost:3000',
timeout: 5000,
reuseExistingServer: true,
},
],
projects: [
{
name: 'chromium',
use: {
viewport: null,
// ...devices['Desktop Chrome'],
// It is important to define the `viewport` property after destructuring `devices`,
// since devices also define the `viewport` for that device.
// viewport: { width: 1280, height: 850 },
},
},
],
outputDir: 'test-results',
})