test: tolerate sticky rail subpixel rounding

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-13 19:52:27 +02:00
1 parent 336ba76fef
commit fb18ac8fc5
1 file changed
+3 -2
+3 -2
View File
@@ -300,8 +300,9 @@ describe("Board grid", () => {
const stickyRailY = (await expectBoundingBoxAsync(rail)).y;
await page.evaluate(() => window.scrollTo({ top: 500, behavior: "auto" }));
expect((await expectBoundingBoxAsync(rail)).y).toBeGreaterThanOrEqual(0);
expect((await expectBoundingBoxAsync(rail)).y).toBeLessThanOrEqual(stickyRailY);
const scrolledRailY = (await expectBoundingBoxAsync(rail)).y;
expect(scrolledRailY).toBeGreaterThanOrEqual(0);
expect(scrolledRailY).toBeLessThanOrEqual(stickyRailY + 0.5);
await page.evaluate(() => window.scrollTo({ top: 0, behavior: "auto" }));
await setDocumentZoomAsync(page, 1.25);