make tests green
This commit is contained in:
parent
e4f2e11ca0
commit
f8d0ed0861
|
|
@ -280,7 +280,8 @@ test.describe('browser', () => {
|
||||||
|
|
||||||
test('support http2', async ({ browser, startCCServer, asset, browserName }) => {
|
test('support http2', async ({ browser, startCCServer, asset, browserName }) => {
|
||||||
test.skip(browserName === 'webkit' && process.platform === 'darwin', 'WebKit on macOS doesn\n proxy localhost');
|
test.skip(browserName === 'webkit' && process.platform === 'darwin', 'WebKit on macOS doesn\n proxy localhost');
|
||||||
const serverURL = await startCCServer({ http2: true });
|
const enableHTTP1FallbackWhenUsingHttp2 = browserName === 'webkit' && process.platform === 'linux';
|
||||||
|
const serverURL = await startCCServer({ http2: true, enableHTTP1FallbackWhenUsingHttp2 });
|
||||||
const page = await browser.newPage({
|
const page = await browser.newPage({
|
||||||
clientCertificates: [{
|
clientCertificates: [{
|
||||||
origin: new URL(serverURL).origin,
|
origin: new URL(serverURL).origin,
|
||||||
|
|
@ -290,7 +291,7 @@ test.describe('browser', () => {
|
||||||
});
|
});
|
||||||
// TODO: We should investigate why http2 is not supported in WebKit on Linux.
|
// TODO: We should investigate why http2 is not supported in WebKit on Linux.
|
||||||
// https://bugs.webkit.org/show_bug.cgi?id=276990
|
// https://bugs.webkit.org/show_bug.cgi?id=276990
|
||||||
const expectedProtocol = browserName === 'webkit' && process.platform === 'linux' ? 'http/1.1' : 'h2';
|
const expectedProtocol = enableHTTP1FallbackWhenUsingHttp2 ? 'http/1.1' : 'h2';
|
||||||
{
|
{
|
||||||
await page.goto(serverURL.replace('localhost', 'local.playwright'));
|
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('message')).toHaveText('Sorry, but you need to provide a client certificate to continue.');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue