-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (37 loc) · 1.03 KB
/
playwright.config.ts
File metadata and controls
39 lines (37 loc) · 1.03 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
import { defineConfig, devices } from '@playwright/test';
const HOST = process.env.PLAYWRIGHT_HOST || '0.0.0.0';
const PORT = process.env.PLAYWRIGHT_PORT || '5173';
const BASE_URL_HOST = process.env.PLAYWRIGHT_BASEURL_HOST || '127.0.0.1';
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: `http://${BASE_URL_HOST}:${PORT}`,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
{
name: 'msedge',
use: { ...devices['Desktop Edge'], channel: 'msedge' },
},
],
webServer: {
command: `npm run dev -- --host ${HOST} --port ${PORT}`,
url: `http://${BASE_URL_HOST}:${PORT}`,
reuseExistingServer: !process.env.CI,
},
});