test: enable localhost proxy tests on webkit mac, unless bypass rules are set (#29641)
This commit is contained in:
parent
4d868f6ba8
commit
d7c4ee901a
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Reference in a new issue