-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.docker.config.ts
More file actions
83 lines (68 loc) · 2.25 KB
/
playwright.docker.config.ts
File metadata and controls
83 lines (68 loc) · 2.25 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { defineConfig, devices } from '@playwright/test';
import { testIgnorePatterns, testMatchPatterns, timeoutSettings } from './tests/playwright/playwright.shared';
/**
* Playwright configuration for Docker development environment.
*
* Usage: npx playwright test --config=playwright.docker.config.ts
*
* This configuration:
* - Uses https://localhost:3333/ as base URL
* - Ignores self-signed certificate errors
* - No webServer (Docker containers are already running)
*/
export default defineConfig({
testDir: './tests/playwright',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Workers - use fewer workers since Docker may have limited resources */
workers: 2,
/* Reporter to use */
reporter: 'html',
/* Global timeout for each test */
timeout: timeoutSettings.testTimeout,
/* Global timeout for expect() */
expect: {
timeout: timeoutSettings.expectTimeout,
},
/* Test match patterns - imported from shared config */
testMatch: testMatchPatterns,
/* Ignore helper files and documentation */
testIgnore: testIgnorePatterns,
/* Shared settings for all the projects below */
use: {
/* Docker development URL - must match SESSION_DOMAIN in docker-compose.dev.yml */
baseURL: 'https://ernie.localhost:3333',
/* Accept self-signed certificates */
ignoreHTTPSErrors: true,
/* Collect trace when retrying the failed test */
trace: 'on-first-retry',
/* Take screenshot on failure */
screenshot: 'only-on-failure',
/* Record video on failure */
video: 'retain-on-failure',
/* Timeout for each action */
actionTimeout: 15 * 1000,
/* Timeout for page navigation */
navigationTimeout: 30 * 1000,
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
/* No webServer - Docker containers handle the server */
});