Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: force crash tests on new worker and keep launchOptions (#21818)
Max Schmitt55df07fd60a9
diff --git a/tests/library/page-event-crash.spec.ts b/tests/library/page-event-crash.spec.tsindex f9f20588f1..0d3b000bb2 100644--- a/tests/library/page-event-crash.spec.ts+++ b/tests/library/page-event-crash.spec.ts@@ -17,7 +17,7 @@import { contextTest as testBase, expect } from '../config/browserTest';-const test = testBase.extend<{ crash: () => void }>({+const test = testBase.extend<{ crash: () => void }, { dummy: string }>({crash: async ({ page, toImpl, browserName }, run) => {run(() => {if (browserName === 'chromium')@@ -27,12 +27,11 @@ const test = testBase.extend<{ crash: () => void }>({else if (browserName === 'firefox')toImpl(page)._delegate._session.send('Page.crash', {}).catch(e => {});});- }+ },+ // Force a separate worker to avoid messing up with other tests.+ dummy: ['', { scope: 'worker' }],});-// Force a separate worker to avoid messing up with other tests.-test.use({ launchOptions: {} });-test('should emit crash event when page crashes', async ({ page, crash }) => {await page.setContent(`<div>This page should crash</div>`);crash();