forked from RedHatInsights/learning-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
26 lines (25 loc) · 1020 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
26 lines (25 loc) · 1020 Bytes
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
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './playwright',
testMatch: /\.spec\.(ts|tsx)$/,
// Run tests serially to avoid flakiness from parallel execution
workers: 1,
// Disable parallel execution within test files
fullyParallel: false,
// Global setup to perform login once before all tests (custom version with proxy support)
globalSetup: './playwright/global-setup-with-proxy.ts',
// Default timeout for element lookups and assertions
expect: {
timeout: 10000,
},
use: {
// Base URL for all tests - use environment variable or default to stage
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'https://console.stage.redhat.com',
// Reuse authentication state across all tests
storageState: './playwright/.auth/user.json',
// Ignore HTTPS errors globally
ignoreHTTPSErrors: true,
// Optional proxy support via environment variable
...(process.env.E2E_PROXY && { proxy: { server: process.env.E2E_PROXY } }),
},
});