/
playwright.config.ts
41 lines (39 loc) · 1.03 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
// playwright.config.ts
import { PlaywrightTestConfig, devices } from '@playwright/test';
import dotenv from 'dotenv';
import path from 'path';
dotenv.config();
dotenv.config({ path: path.resolve(__dirname, './local.env') });
const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run start', // command to launch
port: 3000, // port to await for
timeout: 5 * 60 * 1000,
reuseExistingServer: !process.env.CI,
},
// choose html to create visible report
reporter: 'html',
forbidOnly: !!process.env.CI,
retries: 2,
timeout: 5 * 60 * 1000,
globalTimeout: 5 * 60 * 1000,
use: {
trace: 'on',
video: 'on',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
};
export default config;