Customize Playwright reporter and retries for dev and CI env

This commit is contained in:
ramki-bruno
2025-05-14 11:54:33 +05:30
parent d4673a2f07
commit 2f58379feb

View File

@@ -1,12 +1,19 @@
import { defineConfig, devices } from '@playwright/test';
const reporter: string[][string] = [['list'], ['html']];
if (process.env.CI) {
reporter.push(["github"]);
}
export default defineConfig({
testDir: './e2e-tests',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? undefined : 1,
reporter: 'html',
reporter,
use: {
trace: 'on-first-retry'
},