From ae6cf1f1c2da6ff50eb1b0dcb292fb6fe74e4de2 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 19 Sep 2023 10:22:34 -0400 Subject: [PATCH] test(playwright): only use retries on CI We currently use retries on CI to help catch flaky tests. However, retries are enabled even when testing locally. This is not ideal because a failing test will be re-run multiple times before erroring out which increases the time it takes to run tests locally. --- core/playwright.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/playwright.config.ts b/core/playwright.config.ts index 9cfb9fb810d..4a7038b4647 100644 --- a/core/playwright.config.ts +++ b/core/playwright.config.ts @@ -60,7 +60,8 @@ const config: PlaywrightTestConfig = { /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, maxFailures: 0, - retries: 2, + /* Test retries help catch flaky tests on CI */ + retries: process.env.CI ? 2 : 0, reportSlowTests: null, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined,