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: add test for fetch with keepalive: true on Firefox (#34498)
Max Schmittbc1a8c21912c
diff --git a/tests/page/page-event-request.spec.ts b/tests/page/page-event-request.spec.tsindex e1fc29eb59..b2e13a4c2f 100644--- a/tests/page/page-event-request.spec.ts+++ b/tests/page/page-event-request.spec.ts@@ -41,6 +41,20 @@ it('should fire for fetches', async ({ page, server }) => {expect(requests.length).toBe(2);});+it('should fire for fetches with keepalive: true', {+ annotation: {+ type: 'issue',+ description: 'https://github.com/microsoft/playwright/issues/34497'+ }+}, async ({ page, server, browserName }) => {+ it.fixme(browserName === 'firefox');+ const requests = [];+ page.on('request', request => requests.push(request));+ await page.goto(server.EMPTY_PAGE);+ await page.evaluate(() => fetch('/empty.html', { keepalive: true }));+ expect(requests.length).toBe(2);+});+it('should report requests and responses handled by service worker', async ({ page, server, isAndroid, isElectron }) => {it.fixme(isAndroid);it.fixme(isElectron);