Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: update webkit expectations for NWLoader on macOS (#42202)
Yury Semikhatsky1d8f8afa708e
diff --git a/tests/library/har-websocket.spec.ts b/tests/library/har-websocket.spec.tsindex 9ef6193ff0..eaedb134bb 100644--- a/tests/library/har-websocket.spec.ts+++ b/tests/library/har-websocket.spec.ts@@ -97,7 +97,8 @@ it('should only have one websocket entry', async ({ contextFactory, server }, teexpect(wsEntry._resourceType).toBe('websocket');});-it('should include websocket handshake headers and status', async ({ contextFactory, server }, testInfo) => {+it('should include websocket handshake headers and status', async ({ contextFactory, server, browserName, isMac, macVersion }, testInfo) => {+ it.fixme(browserName === 'webkit' && isMac && macVersion >= 26, 'NWLoader does not reflect the wire handshake headers (Sec-WebSocket-Key, Connection, Upgrade) in NSURLSessionWebSocketTask.currentRequest');server.onceWebSocketConnection(ws => {ws.on('message', () => ws.close());});diff --git a/tests/page/page-network-sizes.spec.ts b/tests/page/page-network-sizes.spec.tsindex 3157b4dffb..bbbb3508ea 100644--- a/tests/page/page-network-sizes.spec.ts+++ b/tests/page/page-network-sizes.spec.ts@@ -93,8 +93,9 @@ it('should have the correct responseBodySize for chunked request', async ({ pageconst sizes = await response.request().sizes();// The actual file size is 5100 bytes. The extra 75 bytes are coming from the chunked encoding headers and end bytes.if (browserName === 'webkit')- // It should be 5175 there. On the actual network response, the body has a size of 5175.- expect(sizes.responseBodySize).toBe(5173);+ // WebKit on macOS reports 5173 with the legacy CFNetwork loader (builds <= 2346) and the+ // correct 5175 with NWLoader. TODO: expect 5175 once the NWLoader-based build ships.+ expect([5173, 5175]).toContain(sizes.responseBodySize);elseexpect(sizes.responseBodySize).toBe(5175);});