Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: fix socks proxy test for wk mac (#20227)

Dmitry Gozman3f79786cf878
diff --git a/tests/library/browsertype-connect.spec.ts b/tests/library/browsertype-connect.spec.ts
index a5ab14b691..c83cf9c278 100644
--- a/tests/library/browsertype-connect.spec.ts
+++ b/tests/library/browsertype-connect.spec.ts
@@ -825,16 +825,16 @@ for (const kind of ['launchServer', 'run-server'] as const) {
});
const remoteServer = await startRemoteServer(kind);
const browser = await connect(remoteServer.wsEndpoint(), {
- _exposeNetwork: 'localhost',
+ _exposeNetwork: '127.0.0.1',
headers: {
'x-playwright-proxy': '*',
},
} as any, dummyServerPort);
const page = await browser.newPage();
- // 127.0.0.1 should fail on the client side.
+ // local.playwright should fail on the client side.
let failed = false;
- await page.goto(`http://127.0.0.1:${server.PORT}/foo.html`).catch(e => {
+ await page.goto(`http://local.playwright:${server.PORT}/foo.html`).catch(e => {
failed = true;
});
expect(failed).toBe(true);
diff --git a/tests/library/defaultbrowsercontext-2.spec.ts b/tests/library/defaultbrowsercontext-2.spec.ts
index 06fed51e38..4babd8e278 100644
--- a/tests/library/defaultbrowsercontext-2.spec.ts
+++ b/tests/library/defaultbrowsercontext-2.spec.ts
@@ -96,7 +96,6 @@ it('should accept userDataDir', async ({ createUserDataDir, browserType }) => {
});
it('should restore state from userDataDir', async ({ browserType, server, createUserDataDir, isMac, browserName }) => {
- it.fixme(browserName === 'firefox', 'https://github.com/microsoft/playwright/issues/12632');
it.slow();
const userDataDir = await createUserDataDir();