Files
m8sh/playwright.config.ts
T

41 lines
903 B
TypeScript
Raw Normal View History

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