-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplaywright.config.js
More file actions
62 lines (62 loc) · 1.35 KB
/
playwright.config.js
File metadata and controls
62 lines (62 loc) · 1.35 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 } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
timeout: 30000,
retries: 1,
outputDir: 'tests/results/e2e',
fullyParallel: true,
workers: process.env.CI ? 6 : undefined,
reporter: process.env.CI
? [
['blob'],
['html', { outputFolder: 'tests/results/playwright-report', open: 'never' }],
['json', { outputFile: 'tests/results/e2e/results.json' }],
]
: [
['html', { outputFolder: 'tests/results/playwright-report', open: 'never' }],
['json', { outputFile: 'tests/results/e2e/results.json' }],
],
use: {
baseURL: 'http://localhost:8060',
headless: true,
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
},
webServer: {
command: 'bun www',
port: 8060,
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
projects: [
{
name: 'Chrome',
use: {
channel: 'chrome',
},
},
{
name: 'Firefox',
use: {
browserName: 'firefox',
// Firefox-specific settings for CI environment
launchOptions: {
firefoxUserPrefs: {
'dom.disable_beforeunload': true,
},
},
},
},
{
name: 'WebKit',
use: {
browserName: 'webkit',
// WebKit-specific settings to handle pointer event issues
actionTimeout: 10000,
},
timeout: 45000,
},
],
});