diff --git a/tests/sanity/tests/playwright.config.ts b/tests/sanity/tests/playwright.config.ts index 7454893abf..ffd9f15e2d 100644 --- a/tests/sanity/tests/playwright.config.ts +++ b/tests/sanity/tests/playwright.config.ts @@ -2,6 +2,11 @@ import { devices, PlaywrightTestConfig } from '@playwright/test' import { config as dotenvConfig } from 'dotenv' dotenvConfig() +let maxFailures: number | undefined +if (process.env.TESTS_MAX_FAILURES !== undefined) { + maxFailures = parseInt(process.env.TESTS_MAX_FAILURES) +} + const config: PlaywrightTestConfig = { projects: [ { @@ -25,7 +30,7 @@ const config: PlaywrightTestConfig = { ], retries: 1, timeout: 60000, - maxFailures: 5, + maxFailures, expect: { timeout: 15000 },