test: verify overriding postdata and method on navigation (#4317)
References #4309
This commit is contained in:
parent
e3abb0aa32
commit
770411be9d
@ -424,6 +424,18 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
|
|||||||
]);
|
]);
|
||||||
expect(await serverRequest.postBody).toBe('doggo');
|
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() {
|
describe_fails_ffox('Request.respond', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user