From 501c840db43299b5421a7718c1d768169eac8273 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Mon, 20 Feb 2023 18:25:21 +0000 Subject: [PATCH] make playwright fail faster locally locally playwright is very fast and not flaky, so in order to have a quicker development cycle reduce the playwright timeouts so that if something is off playwright can fail tests quicker --- playwright.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index bcdeed3..50bd2a0 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -13,13 +13,13 @@ import { devices } from '@playwright/test' const config: PlaywrightTestConfig = { testDir: './ui-e2e-tests', /* Maximum time one test can run for. */ - timeout: 30 * 1000, + timeout: (process.env.CI ? 30 : 5) * 1000, expect: { /** * Maximum time expect() should wait for the condition to be met. * For example in `await expect(locator).toHaveText();` */ - timeout: 5000, + timeout: process.env.CI ? 5000 : 500, }, /* Run tests in files in parallel */ fullyParallel: true,