Files
stockfill/playwright.config.ts
T
beatzaplenty a84d5dafa2 modified: .gitignore
modified:   e2e/picklist.spec.ts
	modified:   e2e/product-filter.spec.ts
	modified:   maintenance.sh
	modified:   package-lock.json
	modified:   package.json
	modified:   playwright.config.ts
2025-12-02 09:15:14 +10:00

40 lines
1.3 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
import { defineCoverageReporterConfig } from '@bgotink/playwright-coverage';
import path from 'path';
export default defineConfig({
reporter: [
['list'],
[
'@bgotink/playwright-coverage',
defineCoverageReporterConfig({
sourceRoot: process.cwd(), // root used to resolve source files
exclude: ['node_modules/**', 'e2e/**'], // exclude test sources and deps
resultDir: path.join(process.cwd(), 'e2e-coverage-report'),
reports: [
['html'], // interactive HTML at results/e2e-coverage/index.html
['lcovonly', { file: 'coverage.lcov' }], // LCOV for CI
['text-summary', { file: null }], // summary in console
],
// If your source maps produce wrong paths, add rewritePath:
// rewritePath: ({ absolutePath, relativePath }) => absolutePath
}),
],
],
testDir: './e2e',
fullyParallel: false,
workers: 4,
retries: process.env.CI ? 2 : 0,
use: {
baseURL: 'http://127.0.0.1:4173',
headless: true,
trace: 'on-first-retry',
},
webServer: {
command: 'npm run dev -- --host --port 4173',
url: 'http://127.0.0.1:4173',
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
},
});