-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
49 lines (46 loc) · 1.45 KB
/
Copy pathplaywright.config.ts
File metadata and controls
49 lines (46 loc) · 1.45 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
import { defineConfig, devices } from '@playwright/test'
const macosSandboxLaunchArgs =
process.platform === 'darwin' ? ['--single-process'] : []
// On Linux 26.04 the Playwright-managed chrome-headless-shell binary is not
// available (Playwright supportedOSes table lags upstream Ubuntu releases).
// `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` lets the dev box point at a
// system-installed Chrome (`/usr/bin/google-chrome`) so e2e can still run
// without waiting for upstream to bless the OS version.
const linuxExecutableOverride =
process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH ||
process.env.PLAYWRIGHT_CHROME_EXECUTABLE_PATH ||
undefined
export default defineConfig({
testDir: './tests/e2e',
testIgnore: 'desktop-bridge.spec.ts',
fullyParallel: true,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI
? [['github'], ['html', { open: 'never' }]]
: [['list']],
use: {
baseURL: 'http://127.0.0.1:1420',
trace: 'retain-on-failure',
},
webServer: {
command: 'bun run dev',
url: 'http://127.0.0.1:1420',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
launchOptions: {
args: macosSandboxLaunchArgs,
...(linuxExecutableOverride
? { executablePath: linuxExecutableOverride }
: {}),
},
},
},
],
})