From 2f58379feb9af1355904bf9c992cd0c94c70a354 Mon Sep 17 00:00:00 2001 From: ramki-bruno Date: Wed, 14 May 2025 11:54:33 +0530 Subject: [PATCH] Customize Playwright reporter and retries for dev and CI env --- playwright.config.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index b0adb030f..684477e40 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -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' },