Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(test-runner): default @playwright/test timeout to 0 (#7312)

Andrey Lushnikov1157f622f348
diff --git a/src/test/index.ts b/src/test/index.ts
index 2fd820706c..c53f99cc4b 100644
--- a/src/test/index.ts
+++ b/src/test/index.ts
@@ -39,6 +39,7 @@ export const test = _baseTest.extend<PlaywrightTestArgs & PlaywrightTestOptions,
throw new Error(`Unexpected browserName "${browserName}", must be one of "chromium", "firefox" or "webkit"`);
const options: LaunchOptions = {
handleSIGINT: false,
+ timeout: 0,
...launchOptions,
};
if (headless !== undefined)
@@ -140,6 +141,7 @@ export const test = _baseTest.extend<PlaywrightTestArgs & PlaywrightTestOptions,
options.viewport = viewport;
const context = await browser.newContext(options);
+ context.setDefaultTimeout(0);
const allPages: Page[] = [];
context.on('page', page => allPages.push(page));