diff --git a/tests/library/proxy.spec.ts b/tests/library/proxy.spec.ts index b7df2b66f7a7f..6cd1cb401d8dc 100644 --- a/tests/library/proxy.spec.ts +++ b/tests/library/proxy.spec.ts @@ -323,7 +323,7 @@ it('should use SOCKS proxy for websocket requests', async ({ browserType, server await closeProxyServer(); }); -it('should use http proxy for websocket requests', async ({ browserName, browserType, server, proxyServer }) => { +it('should use http proxy for websocket requests', async ({ browserName, browserType, server, proxyServer, isWindows }) => { proxyServer.forwardTo(server.PORT, { allowConnectRequests: true }); const browser = await browserType.launch({ proxy: { server: `localhost:${proxyServer.PORT}` } @@ -350,7 +350,7 @@ it('should use http proxy for websocket requests', async ({ browserName, browser // WebKit does not use CONNECT for websockets, but other browsers do. if (browserName === 'webkit') - expect(proxyServer.wsUrls).toContain('ws://fake-localhost-127-0-0-1.nip.io:1337/ws'); + expect(proxyServer.wsUrls).toContain(isWindows ? '/ws' : 'ws://fake-localhost-127-0-0-1.nip.io:1337/ws'); else expect(proxyServer.connectHosts).toContain('fake-localhost-127-0-0-1.nip.io:1337');