-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaywright.config.ts
59 lines (57 loc) · 1.34 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
50
51
52
53
54
55
56
57
58
59
import { defineConfig, devices } from '@playwright/test';
// This should be no less than the minimal viewport
// that your app supports.
// The default viewport varies by browsers:
// /~https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
const VIEWPORT = { width: 1300, height: 900 };
const WORKERS = 4;
export default defineConfig({
testDir: './src/tests',
fullyParallel: true,
workers: WORKERS,
reporter: [['html', { open: 'never' }]],
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
viewport: VIEWPORT,
},
retries: 1,
webServer: {
// We go one level upwards because the transpiled version
// will be inside `/tests-out`.
command: 'npx vite preview --outDir=dist-e2e',
stdout: 'pipe',
stderr: 'pipe',
url: 'http://localhost:3000',
cwd: '../mock-app',
},
projects: [
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
timeout: 60 * 1000,
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
{
name: 'edge',
use: {
...devices['Desktop Edge'],
channel: 'msedge',
},
},
{
name: 'chrome',
use: {
...devices['Desktop Chrome'],
channel: 'chrome',
},
},
],
});