forked from nuxt/movies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.ts
60 lines (59 loc) · 1.33 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
60
import type { ConfigOptions } from '@nuxt/test-utils/playwright'
import process from 'node:process'
import { defineConfig, devices } from '@playwright/test'
export default defineConfig<ConfigOptions>({
testMatch: '**/tests/e2e/*.spec.ts',
use: {
baseURL: process.env.BASE_URL,
},
/* Configure projects for major browsers */
projects: [
{
name: 'Chrome',
use: {
...devices['Desktop Chrome'],
browserName: 'chromium',
channel: 'chrome',
isMobile: false,
},
metadata: {
deviceName: 'desktop-chrome',
},
},
{
name: 'Safari',
use: {
...devices['Desktop Safari'],
browserName: 'webkit',
isMobile: false,
},
metadata: {
deviceName: 'desktop-safari',
},
},
{
name: 'Mobile Chrome',
use: {
...devices['Samsung Galaxy S20'],
browserName: 'chromium',
isMobile: true,
viewport: { width: 412, height: 915 },
},
metadata: {
deviceName: 'Samsung-Galaxy-20',
},
},
{
name: 'Mobile Safari',
use: {
...devices['iPhone 14'],
isMobile: true,
browserName: 'webkit',
viewport: { width: 412, height: 915 },
},
metadata: {
deviceName: 'Iphone-14',
},
},
],
})