Skip to content

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

test: make "remove header" test actually test be havior (#4092)

Yury Semikhatsky180aa011d0c9
diff --git a/test/page-route.spec.ts b/test/page-route.spec.ts
index 0c281fc50b..a3a50f2f4d 100644
--- a/test/page-route.spec.ts
+++ b/test/page-route.spec.ts
@@ -100,7 +100,7 @@ it('should be able to remove headers', async ({page, server}) => {
await page.route('**/*', route => {
const headers = Object.assign({}, route.request().headers(), {
foo: 'bar',
- origin: undefined, // remove "origin" header
+ accept: undefined, // remove "accept" header
});
route.continue({ headers });
});
@@ -110,7 +110,7 @@ it('should be able to remove headers', async ({page, server}) => {
page.goto(server.PREFIX + '/empty.html')
]);
- expect(serverRequest.headers.origin).toBe(undefined);
+ expect(serverRequest.headers.accept).toBe(undefined);
});
it('should contain referer header', async ({page, server}) => {