From 50256b19f1f423ebf8e72685910cae9950fa658a Mon Sep 17 00:00:00 2001 From: bchanot Date: Sat, 14 Nov 2026 19:11:39 +0100 Subject: [PATCH] fix(editor): sub-pixel tolerance on the 375 px sheet width check --- apps/app/e2e/shell/editor-citations.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/app/e2e/shell/editor-citations.spec.ts b/apps/app/e2e/shell/editor-citations.spec.ts index 39af5f21..5698ffb2 100644 --- a/apps/app/e2e/shell/editor-citations.spec.ts +++ b/apps/app/e2e/shell/editor-citations.spec.ts @@ -576,7 +576,8 @@ test.describe('citations sheet, read-only at 375 px', () => { // Full width: the sheet is min(34 rem, 100 vw), so the whole phone screen. const layer = page.locator('[data-place="citations"]') const box = await layer.boundingBox() - expect(box?.width ?? 0).toBeLessThanOrEqual(375) + // Sub-pixel layout rounding (375.00001…): the tolerance of editor-shell-layout (3a7ffa2). + expect(box?.width ?? 0).toBeLessThanOrEqual(375 + 0.5) expect(Math.abs((box?.width ?? 0) - 375)).toBeLessThan(1) await expect(heads(page)).toHaveCount(3) await expectNoHorizontalOverflow(page, 'the sheet at 375 px')