chore: fix test to work on Windows with auto.crlf = false (#10296)
This commit is contained in:
parent
6a46711347
commit
faf9d901c1
|
|
@ -15,9 +15,10 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import os from 'os';
|
|
||||||
import type { Route } from 'playwright-core';
|
import type { Route } from 'playwright-core';
|
||||||
import { expect, test as it } from './pageTest';
|
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('should fulfill intercepted response', async ({ page, server, isElectron }) => {
|
||||||
it.fixme(isElectron, 'error: Browser context management is not supported.');
|
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 response = await page.goto(server.PREFIX + '/title.html');
|
||||||
const request = await requestPromise;
|
const request = await requestPromise;
|
||||||
expect(request.url).toBe('/title.html');
|
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 }) => {
|
it('should give access to the intercepted response', async ({ page, server, isElectron }) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue