-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
86 lines (82 loc) · 2.66 KB
/
playwright.config.ts
File metadata and controls
86 lines (82 loc) · 2.66 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
/**
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { defineConfig, devices } from '@playwright/test';
type BrowserPathConfig = Record<string, string>;
type BrowserPathConfigs = Record<string, BrowserPathConfig>;
const browserPaths: BrowserPathConfigs = {
// Chromium 110.0.5481.38 (bundled with Playwright 1.30, as chromium-1045)
"chromium-110-nosupport": {
darwin: './custom-browsers/chromium-1045/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
linux: './custom-browsers/chromium-1045/chrome-linux/chrome',
win32: './custom-browsers/chromium-1045/chrome-win/chrome.exe',
},
// Firefox 142.0.1 (bundled with Playwright 1.56, as firefox-1495)
"firefox-142-nosupport": {
darwin: './custom-browsers/firefox-1495/firefox/Nightly.app/Contents/MacOS/firefox',
linux: './custom-browsers/firefox-1495/firefox/firefox-bin',
win32: './custom-browsers/firefox-1495/firefox/firefox.exe',
},
// Safari 17.4 (bundled with Playwright 1.45, as webkit-2035)
"webkit-17.4-nosupport": {
darwin: './custom-browsers/webkit-2035/pw_run.sh',
linux: './custom-browsers/webkit-2035/pw_run.sh',
win32: './custom-browsers/webkit-2035/webkit-win64/Playwright.exe',
},
};
export default defineConfig({
testDir: './tests',
tsconfig: './tsconfig.json',
workers: 3,
fullyParallel: true,
projects: [
{
name: 'chromium-latest',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox-latest',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit-latest',
use: { ...devices['Desktop Safari'] },
},
{
name: 'firefox-142-nosupport',
use: {
...devices['Desktop Firefox'],
launchOptions: {
executablePath: browserPaths['firefox-142-nosupport'][process.platform],
},
},
},
{
name: 'chromium-110-nosupport',
use: {
...devices['Desktop Chrome'],
launchOptions: {
executablePath: browserPaths['chromium-110-nosupport'][process.platform],
},
},
},
// // Disabled, because of this error:
// // “Error: browserContext.newPage: Protocol error (Page.overrideSetting): Unknown setting: FixedBackgroundsPaintRelativeToDocument”
// {
// name: 'webkit-17.4-nosupport',
// use: {
// ...devices['Desktop Safari'],
// launchOptions: {
// executablePath: browserPaths['webkit-17.4-nosupport'][process.platform],
// },
// },
// },
],
webServer: {
command: 'npx esbuild --serve=7357 --servedir=. --log-level=silent',
port: 7357,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
},
});