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(webkit): update webkit-wsl launch expectations for executablePath (#41334)
Yury Semikhatsky2283a8ff186c
diff --git a/tests/library/browsertype-launch.spec.ts b/tests/library/browsertype-launch.spec.tsindex 8c138782ce..6b58d64e20 100644--- a/tests/library/browsertype-launch.spec.ts+++ b/tests/library/browsertype-launch.spec.ts@@ -64,18 +64,15 @@ it('should throw if page argument is passed', async ({ browserType, browserName,it('should reject if launched browser fails immediately', async ({ mode, browserType, asset, channel }) => {const error = await browserType.launch({ executablePath: asset('dummy_bad_browser_executable.js') }).catch(e => e);if (channel === 'webkit-wsl')- expect(error.message).toContain('Cannot specify executablePath when using the \"webkit-wsl\" channel.');+ expect(error.message).toContain('Failed to launch');elseexpect(error.message).toMatch(/browserType\.launch(.|\n)*(spawn UNKNOWN|spawn EFTYPE|Browser logs:)/gim);});-it('should reject if executable path is invalid', async ({ browserType, mode, channel }) => {+it('should reject if executable path is invalid', async ({ browserType, mode }) => {let waitError: Error | undefined;await browserType.launch({ executablePath: 'random-invalid-path' }).catch(e => waitError = e);- if (channel === 'webkit-wsl')- expect(waitError!.message).toContain('Cannot specify executablePath when using the \"webkit-wsl\" channel.');- else- expect(waitError!.message).toContain('Failed to launch');+ expect(waitError!.message).toContain('Failed to launch');});it('should handle timeout', async ({ browserType, mode }) => {