-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.devstack.config.ts
More file actions
62 lines (54 loc) · 1.53 KB
/
Copy pathplaywright.devstack.config.ts
File metadata and controls
62 lines (54 loc) · 1.53 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
import { defineConfig, devices } from '@playwright/test';
import { testIgnorePatterns, testMatchPatterns, timeoutSettings } from './tests/playwright/playwright.shared';
/**
* Playwright configuration for local development against the running Docker dev stack.
*
* Important:
* - This is intended for manual/local runs.
* - CI should keep using its existing config(s).
*
* Usage:
* - npm run test:e2e:devstack
* - PLAYWRIGHT_BASE_URL=https://ernie.localhost:3333 npx playwright test --config=playwright.devstack.config.ts
*/
export default defineConfig({
testDir: './tests/playwright',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 0,
workers: 2,
reporter: 'html',
timeout: timeoutSettings.testTimeout,
expect: {
timeout: timeoutSettings.expectTimeout,
},
testMatch: testMatchPatterns,
testIgnore: testIgnorePatterns,
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? 'https://ernie.localhost:3333',
ignoreHTTPSErrors: true,
extraHTTPHeaders: {
'X-ERNIE-Playwright-Test': '1',
},
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 15 * 1000,
navigationTimeout: 30 * 1000,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
// No webServer: docker-compose.dev.yml provides the app+vite+traefik.
});