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: enable localhost proxy tests on webkit mac, unless bypass rules are set (#29641)
Dmitry Gozmand7c4ee901aa6
diff --git a/tests/library/browsercontext-proxy.spec.ts b/tests/library/browsercontext-proxy.spec.tsindex 3335d9edfb..ab121ad53f 100644--- a/tests/library/browsercontext-proxy.spec.ts+++ b/tests/library/browsercontext-proxy.spec.ts@@ -132,14 +132,14 @@ it.describe('should proxy local network requests', () => {}]) {it(`${params.description}`, async ({ platform, browserName, contextFactory, server, proxyServer }) => {- it.skip(browserName === 'webkit' && platform === 'darwin' && ['localhost', '127.0.0.1'].includes(params.target), 'Mac webkit does not proxy localhost');+ it.skip(browserName === 'webkit' && platform === 'darwin' && ['localhost', '127.0.0.1'].includes(params.target) && additionalBypass, 'Mac webkit does not proxy localhost when bypass rules are set');const path = `/target-${additionalBypass}-${params.target}.html`;server.setRoute(path, async (req, res) => {res.end('<html><title>Served by the proxy</title></html>');});- const url = `http://${params.target}:${server.PORT}${path}`;+ const url = `http://${params.target}:55555${path}`;proxyServer.forwardTo(server.PORT);const context = await contextFactory({proxy: { server: `localhost:${proxyServer.PORT}`, bypass: additionalBypass ? '1.non.existent.domain.for.the.test' : undefined }diff --git a/tests/library/proxy.spec.ts b/tests/library/proxy.spec.tsindex b69098422c..0425185cd5 100644--- a/tests/library/proxy.spec.ts+++ b/tests/library/proxy.spec.ts@@ -91,14 +91,14 @@ it.describe('should proxy local network requests', () => {}]) {it(`${params.description}`, async ({ platform, browserName, browserType, server, proxyServer }) => {- it.skip(browserName === 'webkit' && platform === 'darwin' && ['localhost', '127.0.0.1'].includes(params.target), 'Mac webkit does not proxy localhost.');+ it.skip(browserName === 'webkit' && platform === 'darwin' && ['localhost', '127.0.0.1'].includes(params.target) && additionalBypass, 'Mac webkit does not proxy localhost when bypass rules are set.');const path = `/target-${additionalBypass}-${params.target}.html`;server.setRoute(path, async (req, res) => {res.end('<html><title>Served by the proxy</title></html>');});- const url = `http://${params.target}:${server.PORT}${path}`;+ const url = `http://${params.target}:55555${path}`;proxyServer.forwardTo(server.PORT);const browser = await browserType.launch({proxy: { server: `localhost:${proxyServer.PORT}`, bypass: additionalBypass ? '1.non.existent.domain.for.the.test' : undefined }