From acbcc1477131a9583182bccaf1b7361d0689bcb4 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sun, 4 Dec 2022 11:55:56 +0800 Subject: [PATCH] fix(playwright): remove \r --- tests/playwright/pages/Dashboard/common/Toolbar/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/index.ts b/tests/playwright/pages/Dashboard/common/Toolbar/index.ts index 02c1f6bedb..c97c263051 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/index.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/index.ts @@ -128,8 +128,8 @@ export class ToolbarPage extends BasePage { await download.saveAs('./output/at.txt'); // verify downloaded content against expected content - const expectedData = fs.readFileSync(`./fixtures/${verificationFile}`, 'utf8'); - const file = fs.readFileSync('./output/at.txt', 'utf8'); + const expectedData = fs.readFileSync(`./fixtures/${verificationFile}`, 'utf8').replace(/\r/g, '').split('\n'); + const file = fs.readFileSync('./output/at.txt', 'utf8').replace(/\r/g, '').split('\n'); await expect(file).toEqual(expectedData); }