Skip to content

Commit

Permalink
[DO-NOT-MERGE] Debug freetext scroll intermittent
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandermeij committed Jul 9, 2024
1 parent 1bdd692 commit 4ddd378
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/integration/freetext_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {

Check failure on line 3538 in test/integration/freetext_editor_spec.mjs

View workflow job for this annotation

GitHub Actions / Lint (lts/*)

Unexpected fit
await Promise.all(
pages.map(async ([browserName, page]) => {
await switchToFreeText(page);
Expand Down Expand Up @@ -3650,6 +3650,23 @@ describe("FreeText Editor", () => {
clip: editorRect,
type: "png",
});

const editorBase64 = await page.screenshot({
clip: editorRect,
type: "png",
encoding: "base64",
});

const { x, y, width, height } = editorRect;
const editorBase64Larger = await page.screenshot({
clip: { x: x - 100, y: y - 100, width: width + 200, height: height + 200 },

Check failure on line 3662 in test/integration/freetext_editor_spec.mjs

View workflow job for this annotation

GitHub Actions / Lint (lts/*)

Replace `·x:·x·-·100,·y:·y·-·100,·width:·width·+·200,·height:·height·+·200` with `⏎··············x:·x·-·100,⏎··············y:·y·-·100,⏎··············width:·width·+·200,⏎··············height:·height·+·200,⏎···········`
type: "png",
encoding: "base64",
});

console.log("Image: ", editorBase64);
console.log("Larger image: ", editorBase64Larger);

editorImage = PNG.sync.read(editorPng);
expect(editorImage.data.every(x => x === 0xff))

Check failure on line 3671 in test/integration/freetext_editor_spec.mjs

View workflow job for this annotation

GitHub Actions / Lint (lts/*)

'x' is already declared in the upper scope on line 3660 column 19
.withContext(`In ${browserName}`)
Expand Down

0 comments on commit 4ddd378

Please sign in to comment.