Files
gitea/playwright.config.ts
silverwind 6f761219b2 Add WebKit to e2e test matrix (#37298)
Verified locally with 50 runs, averaging 9 seconds per local test suite
run. Total suite took 15s.

`--with-deps` is needed because webkit's dependencies are not
pre-installed on GHA runners (as opposed to firefox/chrome which are
preinstalled).

---
This PR was written with the help of Claude Opus 4.7

---------

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-04-19 19:09:43 +00:00

47 lines
998 B
TypeScript

import {env} from 'node:process';
import {defineConfig, devices} from '@playwright/test';
const timeoutFactor = Number(env.GITEA_TEST_E2E_TIMEOUT_FACTOR) || 1;
const timeout = 5000 * timeoutFactor;
export default defineConfig({
workers: '50%',
fullyParallel: true,
testDir: './tests/e2e/',
outputDir: './tests/e2e-output/',
testMatch: /.*\.test\.ts/,
forbidOnly: Boolean(env.CI),
reporter: 'list',
timeout: 2 * timeout,
expect: {
timeout,
},
use: {
baseURL: env.GITEA_TEST_E2E_URL?.replace?.(/\/$/, ''),
locale: 'en-US',
actionTimeout: timeout,
navigationTimeout: 2 * timeout,
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
permissions: ['clipboard-read', 'clipboard-write'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
],
});