Files
oikos/playwright.config.mjs
T
2026-05-12 10:15:45 +02:00

35 lines
1.1 KiB
JavaScript

import { defineConfig, devices } from '@playwright/test';
import fs from 'node:fs';
const baseURL = process.env.OIKOS_E2E_BASE_URL || 'https://home.friborg.uk';
const systemChromium = process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH
|| (fs.existsSync('/usr/bin/chromium-browser') ? '/usr/bin/chromium-browser' : undefined)
|| (fs.existsSync('/snap/bin/chromium') ? '/snap/bin/chromium' : undefined);
export default defineConfig({
testDir: './tests/e2e',
timeout: 90_000,
expect: { timeout: 15_000 },
fullyParallel: false,
retries: process.env.CI ? 1 : 0,
reporter: [['list'], ['html', { outputFolder: 'playwright-report', open: 'never' }]],
use: {
baseURL,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
ignoreHTTPSErrors: true,
actionTimeout: 15_000,
navigationTimeout: 30_000,
},
projects: [
{
name: 'chromium-desktop',
use: {
...devices['Desktop Chrome'],
launchOptions: systemChromium ? { executablePath: systemChromium } : undefined,
},
},
],
});