-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
47 lines (44 loc) · 1010 Bytes
/
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
import { loadEnvConfig } from '@next/env';
import { devices, type PlaywrightTestConfig } from '@playwright/test';
loadEnvConfig(process.cwd());
const config: PlaywrightTestConfig = {
testDir: 'e2e',
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? 'github' : 'line',
webServer: {
command: 'yarn start',
port: 3000,
},
use: {
trace: 'on-first-retry',
baseURL: process.env.NEXT_PUBLIC_BASE_URL,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
{
name: 'webkit tablet',
use: { ...devices['iPad (gen 7)'] },
},
{
name: 'chromium mobile',
use: { ...devices['Pixel 5'] },
},
{
name: 'webkit mobile',
use: { ...devices['iPhone 13'] },
},
],
};
export default config;