mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: fix client-certificate tests (#32691)
This commit is contained in:
parent
48030a4eff
commit
61cbca6695
@ -365,7 +365,8 @@ test.describe('browser', () => {
|
||||
});
|
||||
expect(proxyServer.connectHosts).toEqual([]);
|
||||
await page.goto(serverURL);
|
||||
expect([...new Set(proxyServer.connectHosts)]).toEqual([`127.0.0.1:${new URL(serverURL).port}`]);
|
||||
const host = browserName === 'webkit' && process.platform === 'darwin' ? 'localhost' : '127.0.0.1';
|
||||
expect([...new Set(proxyServer.connectHosts)]).toEqual([`${host}:${new URL(serverURL).port}`]);
|
||||
await expect(page.getByTestId('message')).toHaveText('Hello Alice, your certificate was issued by localhost!');
|
||||
await page.close();
|
||||
});
|
||||
@ -389,7 +390,8 @@ test.describe('browser', () => {
|
||||
});
|
||||
expect(connectHosts).toEqual([]);
|
||||
await page.goto(serverURL);
|
||||
expect(connectHosts).toEqual([`127.0.0.1:${serverPort}`]);
|
||||
const host = browserName === 'webkit' && process.platform === 'darwin' ? 'localhost' : '127.0.0.1';
|
||||
expect(connectHosts).toEqual([`${host}:${serverPort}`]);
|
||||
await expect(page.getByTestId('message')).toHaveText('Hello Alice, your certificate was issued by localhost!');
|
||||
await page.close();
|
||||
await closeProxyServer();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user