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
chore: fix test to work on Windows with auto.crlf = false (#10296)
Andrey Lushnikovfaf9d901c12d
diff --git a/tests/page/page-request-intercept.spec.ts b/tests/page/page-request-intercept.spec.tsindex ff5c3cd1ee..e32af3e927 100644--- a/tests/page/page-request-intercept.spec.ts+++ b/tests/page/page-request-intercept.spec.ts@@ -15,9 +15,10 @@* limitations under the License.*/-import os from 'os';import type { Route } from 'playwright-core';import { expect, test as it } from './pageTest';+import fs from 'fs';+import path from 'path';it('should fulfill intercepted response', async ({ page, server, isElectron }) => {it.fixme(isElectron, 'error: Browser context management is not supported.');@@ -108,7 +109,8 @@ it('should support fulfill after intercept', async ({ page, server, isElectron }const response = await page.goto(server.PREFIX + '/title.html');const request = await requestPromise;expect(request.url).toBe('/title.html');- expect(await response.text()).toBe('<title>Woof-Woof</title>' + os.EOL);+ const original = await fs.promises.readFile(path.join(__dirname, '..', 'assets', 'title.html'), 'utf8');+ expect(await response.text()).toBe(original);});it('should give access to the intercepted response', async ({ page, server, isElectron }) => {