Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: request method is overridden (#15089)
Yury Semikhatsky53404ad1670b
diff --git a/tests/page/page-request-fallback.spec.ts b/tests/page/page-request-fallback.spec.tsindex 30d141fe6d..ba439d72c0 100644--- a/tests/page/page-request-fallback.spec.ts+++ b/tests/page/page-request-fallback.spec.ts@@ -193,11 +193,11 @@ it('should amend method', async ({ page, server }) => {await page.route('**/*', route => route.fallback({ method: 'POST' }));const [request] = await Promise.all([- server.waitForRequest('/sleep.zzz'),+ page.waitForRequest('**/sleep.zzz'),page.evaluate(() => fetch('/sleep.zzz'))]);expect(method).toBe('POST');- expect(request.method).toBe('POST');+ expect(request.method()).toBe('POST');expect((await sRequest).method).toBe('POST');});