-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
66 lines (63 loc) · 1.33 KB
/
playwright.config.ts
File metadata and controls
66 lines (63 loc) · 1.33 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import type { ConfigOptions } from '@nuxt/test-utils/playwright';
import { defineConfig, devices } from '@playwright/test';
import { fileURLToPath } from 'node:url';
const timeout = 10000 * 15 * 2;
export default defineConfig<ConfigOptions>({
forbidOnly: !!process.env.CI,
fullyParallel: true,
projects: [
{
name: 'desktop',
use: {
...devices['Desktop Edge HiDPI'],
video: {
mode: 'on',
size: {
height: 1080,
width: 1920,
},
},
viewport: {
height: 1080,
width: 1920,
},
},
},
{
name: 'mobile',
use: {
...devices['Pixel 5'],
video: {
mode: 'on',
size: {
height: 844,
width: 390,
},
},
viewport: {
height: 844,
width: 390,
},
},
},
],
reporter: 'html',
retries: process.env.CI ? 2 : 0,
timeout,
use: {
nuxt: {
host: 'http://localhost:3000',
rootDir: fileURLToPath(new URL('.', import.meta.url)),
setupTimeout: timeout,
},
trace: 'on-first-retry',
},
webServer: {
command: 'yarn preview',
stderr: 'pipe',
stdout: 'ignore',
timeout,
url: 'http://localhost:3000',
},
workers: process.env.CI ? 2 : undefined,
});