From c6d10b840db95b92dc1e42876bf594849197d13c Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 24 Jul 2024 10:58:10 +0200 Subject: [PATCH] fix linux --- tests/library/client-certificates.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/library/client-certificates.spec.ts b/tests/library/client-certificates.spec.ts index 3aa51700f3..93b37a0289 100644 --- a/tests/library/client-certificates.spec.ts +++ b/tests/library/client-certificates.spec.ts @@ -271,15 +271,17 @@ test.describe('browser', () => { keyPath: asset('client-certificates/client/trusted/key.pem'), }], }); + // TODO: We should investigate why http2 is not supported in WebKit on Linux. + const expectedProtocol = browserName === 'webkit' && process.platform === 'linux' ? 'http/1.1' : 'h2'; { await page.goto(serverURL.replace('localhost', 'local.playwright')); await expect(page.getByText('Sorry, but you need to provide a client certificate to continue.')).toBeVisible(); - await expect(page.getByText('ALPN protocol: h2')).toBeVisible(); + await expect(page.getByText(`ALPN protocol: ${expectedProtocol}`)).toBeVisible(); } { await page.goto(serverURL); await expect(page.getByText('Hello Alice, your certificate was issued by localhost!')).toBeVisible(); - await expect(page.getByText('ALPN protocol: h2')).toBeVisible(); + await expect(page.getByText(`ALPN protocol: ${expectedProtocol}`)).toBeVisible(); } await page.close(); });