Update test expectations
This commit is contained in:
parent
e5b4e63f16
commit
8ebf7f389b
|
|
@ -601,8 +601,7 @@ test.describe('browser', () => {
|
|||
|
||||
test('support http2', async ({ browser, startCCServer, asset, browserName }) => {
|
||||
test.skip(browserName === 'webkit' && process.platform === 'darwin', 'WebKit on macOS doesn\n proxy localhost');
|
||||
const enableHTTP1FallbackWhenUsingHttp2 = browserName === 'webkit' && process.platform === 'linux';
|
||||
const serverURL = await startCCServer({ http2: true, enableHTTP1FallbackWhenUsingHttp2 });
|
||||
const serverURL = await startCCServer({ http2: true });
|
||||
const page = await browser.newPage({
|
||||
ignoreHTTPSErrors: true,
|
||||
clientCertificates: [{
|
||||
|
|
@ -611,19 +610,16 @@ test.describe('browser', () => {
|
|||
keyPath: asset('client-certificates/client/trusted/key.pem'),
|
||||
}],
|
||||
});
|
||||
// TODO: We should investigate why http2 is not supported in WebKit on Linux.
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=276990
|
||||
const expectedProtocol = enableHTTP1FallbackWhenUsingHttp2 ? 'http/1.1' : 'h2';
|
||||
{
|
||||
await page.goto(serverURL.replace('localhost', 'local.playwright'));
|
||||
await expect(page.getByTestId('message')).toHaveText('Sorry, but you need to provide a client certificate to continue.');
|
||||
await expect(page.getByTestId('alpn-protocol')).toHaveText(expectedProtocol);
|
||||
await expect(page.getByTestId('alpn-protocol')).toHaveText('h2');
|
||||
await expect(page.getByTestId('servername')).toHaveText('local.playwright');
|
||||
}
|
||||
{
|
||||
await page.goto(serverURL);
|
||||
await expect(page.getByTestId('message')).toHaveText('Hello Alice, your certificate was issued by localhost!');
|
||||
await expect(page.getByTestId('alpn-protocol')).toHaveText(expectedProtocol);
|
||||
await expect(page.getByTestId('alpn-protocol')).toHaveText('h2');
|
||||
}
|
||||
await page.close();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue