Skip to content

Commit

Permalink
test: route.continue headers are propagated to redirected requests
Browse files Browse the repository at this point in the history
Failing test for microsoft#28758
  • Loading branch information
yury-s committed Dec 22, 2023
1 parent 5f14d42 commit 24bbc0b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/page/page-request-continue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,27 @@ it('should continue preload link requests', async ({ page, server, browserName }
expect(color).toBe('rgb(255, 192, 203)');
});

it('continue should propagate headers to redirects', async ({ page, server, browserName }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/28758' });
it.fixme(browserName !== 'webkit');
await server.setRedirect('/redirect', '/empty.html');
let intercepted = false;
await page.route('**/redirect', route => {
intercepted = true;
void route.continue({
headers: {
...route.request().headers(),
'custom': 'value'
}
});
});
const [serverRequest] = await Promise.all([
server.waitForRequest('/empty.html'),
page.goto(server.PREFIX + '/redirect')
]);
expect(serverRequest.headers['custom']).toBe('value');
});

it('should intercept css variable with background url', async ({ page, server }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/19158' });

Expand Down

0 comments on commit 24bbc0b

Please sign in to comment.