test: add test for fetch with keepalive: true on Firefox

This commit is contained in:
Max Schmitt 2025-01-27 13:23:29 +01:00
parent 640e6a8aa7
commit 9e32f2d9b6

View file

@ -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);