cherry-pick(release-1.12): default @playwright/test timeout to 0 (#7321)

PR #7312 SHA 1157f622f3
This commit is contained in:
Andrey Lushnikov 2021-06-25 11:24:38 -07:00 committed by GitHub
parent 770fce53e7
commit 96fc610408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,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)
@ -146,6 +147,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));