From 47c669caf2a247eb3c333efd28907b32e8ab9dfa Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 31 Mar 2023 19:58:08 +0200 Subject: [PATCH] test: fix service tests (#22111) image --- tests/page/page-goto.spec.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.ts index 5188721562..68839fe92c 100644 --- a/tests/page/page-goto.spec.ts +++ b/tests/page/page-goto.spec.ts @@ -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`);