debian-image-builder-frontend/playwright.config.ts
Sanne Raymaekers 21ec51a69e playwright: adapt tests to hosted
Makes the test's base url, user & password configurable through the
environment. Abstracts differences between hosted and cockpit where
possible to lib, and adds conditionals otherwise.
2025-03-11 13:30:14 +01:00

27 lines
580 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: 'playwright',
fullyParallel: false,
workers: 1,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: [
['html'],
['list'],
],
use: {
headless: true,
baseURL: process.env.BASE_URL ? process.env.BASE_URL : 'http://127.0.0.1:9090',
video: 'retain-on-failure',
trace: 'on-first-retry',
ignoreHTTPSErrors: true,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});