diff --git a/tests/playwright/pages/Dashboard/common/Topbar/index.ts b/tests/playwright/pages/Dashboard/common/Topbar/index.ts index 95ec7e42f9..0b2c5077f3 100644 --- a/tests/playwright/pages/Dashboard/common/Topbar/index.ts +++ b/tests/playwright/pages/Dashboard/common/Topbar/index.ts @@ -129,7 +129,12 @@ export class TopbarPage extends BasePage { // verify downloaded content against expected content 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'); + let fileStr = fs.readFileSync('./output/at.txt', 'utf8').replace(/\r/g, ''); + // remove BOM + if (fileStr.startsWith('\ufeff')) { + fileStr = fileStr.replace('\ufeff', ''); + } + const file = fileStr.split('\n'); expect(file).toEqual(expectedData); }