From fbc4bb02a038d77ddefc4e81c6682532ac6576f4 Mon Sep 17 00:00:00 2001 From: Saafo <46736350+Saafo@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20test(client):=20compare=20settin?= =?UTF-8?q?gs=20scroll=20bounds=20at=20CSS=20pixel=20precision?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/tests/settings-chrome.e2e.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/tests/settings-chrome.e2e.ts b/apps/web/tests/settings-chrome.e2e.ts index 546b2cddb7..302a40331f 100644 --- a/apps/web/tests/settings-chrome.e2e.ts +++ b/apps/web/tests/settings-chrome.e2e.ts @@ -336,8 +336,9 @@ describe('web e2e: settings modal and General preferences', () => { const last = cells.last() expect(await last.evaluate(el => el === document.activeElement)).toBe(true) const lastBox = await last.boundingBox() - expect(lastBox!.x).toBeGreaterThanOrEqual(0) - expect(lastBox!.x + lastBox!.width).toBeLessThanOrEqual(390) + // Scroll offsets can round while glyph widths remain fractional. + expect(Math.round(lastBox!.x)).toBeGreaterThanOrEqual(0) + expect(Math.round(lastBox!.x + lastBox!.width)).toBeLessThanOrEqual(390) await last.click() await expect.poll(() => last.getAttribute('aria-current')).toBe('true') await phone.keyboard.press('Escape')