Skip to content

Commit

Permalink
test: add test for request interception with 302 after POST (#3105)
Browse files Browse the repository at this point in the history
References #3089
  • Loading branch information
aslushnikov committed Aug 17, 2018
1 parent d6eb3b4 commit ce64ae2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/network.spec.js
Expand Up @@ -251,6 +251,21 @@ module.exports.addTests = function({testRunner, expect}) {
const response = await page.goto(server.EMPTY_PAGE);
expect(response.ok()).toBe(true);
});
xit('should work when POST is redirected with 302', async({page, server}) => {
server.setRedirect('/rredirect', '/empty.html');
await page.goto(server.EMPTY_PAGE);
await page.setRequestInterception(true);
page.on('request', request => request.continue());
await page.setContent(`
<form action='/rredirect' method='post'>
<input type="hidden" id="foo" name="foo" value="FOOBAR">
</form>
`);
await Promise.all([
page.$eval('form', form => form.submit()),
page.waitForNavigation()
]);
});
it('should contain referer header', async({page, server}) => {
await page.setRequestInterception(true);
const requests = [];
Expand Down

0 comments on commit ce64ae2

Please sign in to comment.