forked from cboard-org/cboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
101 lines (83 loc) · 2.74 KB
/
playwright.config.ts
File metadata and controls
101 lines (83 loc) · 2.74 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { defineConfig, devices } from '@playwright/test';
/**
* Playwright Configuration for Cboard E2E Tests
*
* Configuration optimized for fastest execution:
* - Maximum parallel execution with optimal worker count
* - Headless mode for faster execution
* - Essential browser coverage only (Chrome + Firefox)
* - Minimal media capture for speed
* - Optimized timeouts
*
* @see https://playwright.dev/docs/test-configuration
*/
// Test credentials configuration
export const testCredentials = {
elevenLabsApiKey: process.env.ELEVENLABS_API_KEY || 'sk_0000000000000000000',
email: process.env.TEST_USER_EMAIL || 'anything@cboard.io',
password: process.env.TEST_USER_PASSWORD || 'lote10mza126',
};
// Set environment variables for backward compatibility
process.env.TEST_USER_EMAIL = testCredentials.email;
process.env.TEST_USER_PASSWORD = testCredentials.password;
process.env.ELEVENLABS_API_KEY = testCredentials.elevenLabsApiKey;
const config = defineConfig({
/* Balanced timeout settings */
expect: {
timeout: 10 * 1000,
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Maximum parallel execution */
fullyParallel: true,
/* Essential browser coverage for fastest execution */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
/* Single mobile project for mobile coverage */
{
name: 'mobile',
use: {
...devices['Pixel 5'],
},
},
],
/* Minimal reporter for speed */
reporter: [['junit', { outputFile: 'test-results/results.xml' }], ['html', { open: 'never' }], ['list']],
/* No retries for faster execution - let failures fail fast */
retries: 0,
testDir: './tests',
/* Balanced timeout settings */
timeout: 60 * 1000, // Increased test timeout for slower browsers,
use: {
/* Balanced timeout settings for reliability vs speed */
actionTimeout: 15 * 1000,
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'https://app.qa.cboard.io',
/* Longer navigation timeout for slow environments */
navigationTimeout: 60 * 1000,
/* No traces, videos, or screenshots for maximum speed */
screenshot: 'off',
trace: 'off',
video: 'off',
},
/* Optimal worker count for cross-browser stability */
workers: process.env.CI ? 5 : 5, // Reduced for stability
/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});
export default config;