From bb876e07a4fc6eabfccb8a0873c9c6e257ea3da6 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Wed, 13 Mar 2024 15:25:15 +0100 Subject: [PATCH] change playwright timeout, retries and reporting options --- playwright.config.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 838b4745..507e1c49 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -16,20 +16,22 @@ export default defineConfig({ /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ - retries: process.env.CI ? 2 : 0, + retries: process.env.CI ? 1 : 0, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: process.env.CI ? 'github' : 'html', + reporter: process.env.CI ? 'line' : 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ // baseURL: 'http://127.0.0.1:3000', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on', + trace: process.env.CI ? 'on-first-retry' : 'on', }, + timeout: 10 * 1000, + /* Configure projects for major browsers */ projects: [ {