Skip to content

Commit a40df9a

Browse files
authored
Merge pull request #20380 from timvandermeij/integration-tests-tweak-viewer-scroll
Tweak the "scroll into view" viewer integration test
2 parents 205fe25 + 4fd3bad commit a40df9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/integration/viewer_spec.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,10 +1453,12 @@ describe("PDF viewer", () => {
14531453
const rect = await getRect(page, annotationSelector);
14541454
const containerRect = await getRect(page, "#viewerContainer");
14551455
expect(
1456-
Math.abs(2 * (rect.y - containerRect.y) - containerRect.height)
1456+
Math.abs(
1457+
2 * (Math.ceil(rect.y) - containerRect.y) - containerRect.height
1458+
)
14571459
)
14581460
.withContext(`In ${browserName}`)
1459-
.toBeLessThan(1);
1461+
.toBeLessThanOrEqual(1);
14601462
})
14611463
);
14621464
});

0 commit comments

Comments
 (0)