test: verify overriding postdata and method on navigation (#4317)

References #4309
This commit is contained in:
Andrey Lushnikov 2019-04-19 18:22:30 -07:00 committed by GitHub
parent e3abb0aa32
commit 770411be9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -424,6 +424,18 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
]);
expect(await serverRequest.postBody).toBe('doggo');
});
it_fails_ffox('should amend both post data and method on navigation', async({page, server}) => {
await page.setRequestInterception(true);
page.on('request', request => {
request.continue({ method: 'POST', postData: 'doggo' });
});
const [serverRequest] = await Promise.all([
server.waitForRequest('/empty.html'),
page.goto(server.EMPTY_PAGE),
]);
expect(serverRequest.method).toBe('POST');
expect(await serverRequest.postBody).toBe('doggo');
});
});
describe_fails_ffox('Request.respond', function() {