-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (40 loc) · 1.54 KB
/
Copy pathplaywright.config.ts
File metadata and controls
42 lines (40 loc) · 1.54 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
import { defineConfig, devices } from '@playwright/test';
// Complete image-preview flows take about 30 seconds on Linux WebKit in CI.
// Give those projects headroom while keeping individual assertions at 10 seconds.
const webkitTimeout = process.platform === 'linux' ? 60_000 : 30_000;
export default defineConfig({
testDir: './e2e',
timeout: 30_000,
expect: { timeout: 10_000 },
fullyParallel: true,
// `list` keeps the console readable; `html` leaves behind playwright-report/
// so a failing CI run has something to upload and inspect. Traces are already
// retained on failure and get embedded in that report.
reporter: [['list'], ['html', { open: 'never' }]],
use: {
baseURL: 'http://127.0.0.1:5173/doc-diff-pro/',
trace: 'retain-on-failure'
},
webServer: {
command: 'pnpm dev --host 127.0.0.1',
url: 'http://127.0.0.1:5173/doc-diff-pro/',
reuseExistingServer: true
},
projects: [
{ name: 'desktop', use: { ...devices['Desktop Chrome'], channel: process.env.PLAYWRIGHT_CHANNEL || 'chrome' } },
{
name: 'mobile',
use: {
...devices['Desktop Chrome'],
channel: process.env.PLAYWRIGHT_CHANNEL || 'chrome',
viewport: { width: 390, height: 844 },
deviceScaleFactor: 2,
hasTouch: true,
isMobile: true
}
},
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', timeout: webkitTimeout, use: { ...devices['Desktop Safari'] } },
{ name: 'mobile-webkit', timeout: webkitTimeout, use: { ...devices['iPhone 13'] } }
]
});