-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (40 loc) · 886 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
42 lines (40 loc) · 886 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
import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:3000';
export default defineConfig({
testDir: './tests/e2e',
outputDir: '.cache/test-results',
timeout: 120_000,
expect: {
timeout: 8_000,
},
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
webServer: {
command: 'npm run dev',
url: baseURL,
reuseExistingServer: true,
timeout: 120_000,
},
projects: [
{
name: 'desktop-chrome',
use: {
browserName: 'chromium',
viewport: { width: 1440, height: 900 },
colorScheme: 'light',
},
},
{
name: 'mobile-chrome',
use: {
browserName: 'chromium',
...devices['iPhone 14'],
colorScheme: 'light',
},
},
],
});