mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-03 07:51:12 +03:00
test: fix service tests (#22111)
<img width="805" alt="image" src="https://user-images.githubusercontent.com/17984549/229117984-1c70541b-7941-40e2-950d-a699e0fc4cc4.png">
This commit is contained in:
parent
a95ced0fef
commit
47c669caf2
@ -300,9 +300,7 @@ it('should throw if networkidle2 is passed as an option', async ({ page, server
|
||||
it('should fail when main resources failed to load', async ({ page, browserName, isWindows, mode }) => {
|
||||
let error = null;
|
||||
await page.goto('http://localhost:44123/non-existing-url').catch(e => error = e);
|
||||
if (mode === 'service')
|
||||
expect(error.message).toContain('net::ERR_SOCKS_CONNECTION_FAILED');
|
||||
else if (browserName === 'chromium')
|
||||
if (browserName === 'chromium')
|
||||
expect(error.message).toContain('net::ERR_CONNECTION_REFUSED');
|
||||
else if (browserName === 'webkit' && isWindows)
|
||||
expect(error.message).toContain(`Couldn\'t connect to server`);
|
||||
|
Loading…
Reference in New Issue
Block a user