Files
FOSSBilling/playwright.config.ts
Adam Daley aa0f776160 Migrate E2E suite from Cypress to Playwright (#4186)
* Migrate E2E suite from Cypress to Playwright

* Address review feedback for Playwright migration

Use Symfony Filesystem::mkdir() for the test uploads directory instead of
suppressed native mkdir, and tolerate an optional trailing slash in the
admin smoke test URL assertions.
2026-08-23 22:23:06 +01:00

38 lines
941 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost';
export default defineConfig({
testDir: './tests/E2E/Playwright/specs',
timeout: 60_000,
expect: {
timeout: 10_000,
},
workers: 1,
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI
? [
['github'],
['html', { outputFolder: 'tests/E2E/Playwright/artifacts/report', open: 'never' }],
]
: [
['list'],
['html', { outputFolder: 'tests/E2E/Playwright/artifacts/report', open: 'on-failure' }],
],
outputDir: 'tests/E2E/Playwright/artifacts/results',
use: {
baseURL,
actionTimeout: 10_000,
navigationTimeout: 30_000,
screenshot: 'only-on-failure',
video: 'retain-on-failure',
trace: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});