Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test(postData): add a failing firefox test (#3098)

Pavel Feldmane56e14859709
diff --git a/test/interception.jest.js b/test/interception.jest.js
index 431aefa8b1..11860f4d34 100644
--- a/test/interception.jest.js
+++ b/test/interception.jest.js
@@ -534,6 +534,17 @@ describe('Request.continue', function() {
]);
expect(await serverRequest.postBody).toBe('doggo');
});
+ it.fail(FFOX)('should amend longer post data', async({page, server}) => {
+ await page.goto(server.EMPTY_PAGE);
+ await page.route('**/*', route => {
+ route.continue({ postData: 'doggo-is-longer-than-birdy' });
+ });
+ const [serverRequest] = await Promise.all([
+ server.waitForRequest('/sleep.zzz'),
+ page.evaluate(() => fetch('/sleep.zzz', { method: 'POST', body: 'birdy' }))
+ ]);
+ expect(await serverRequest.postBody).toBe('doggo-is-longer-than-birdy');
+ });
});
describe('Request.fulfill', function() {