From d9d181c467dae19c0ae52e4538e4f2108b3b3f65 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Tue, 9 Jul 2024 17:59:17 +0200 Subject: [PATCH] [DO-NOT-MERGE] Debug freetext scroll intermittent --- test/integration/freetext_editor_spec.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/freetext_editor_spec.mjs b/test/integration/freetext_editor_spec.mjs index d03df9fa69feb..95d49b634221f 100644 --- a/test/integration/freetext_editor_spec.mjs +++ b/test/integration/freetext_editor_spec.mjs @@ -3535,7 +3535,7 @@ describe("FreeText Editor", () => { await closePages(pages); }); - it("must check that a freetext is still there after having updated it and scroll the doc", async () => { + fit("must check that a freetext is still there after having updated it and scroll the doc", async () => { await Promise.all( pages.map(async ([browserName, page]) => { await switchToFreeText(page); @@ -3649,8 +3649,11 @@ describe("FreeText Editor", () => { editorPng = await page.screenshot({ clip: editorRect, type: "png", + encoding: "base64", }); - editorImage = PNG.sync.read(editorPng); + console.log("Base64 image: ", editorPng); + + editorImage = PNG.sync.read(Buffer.from(editorPng, 'base64')); expect(editorImage.data.every(x => x === 0xff)) .withContext(`In ${browserName}`) .toBeFalse();