🧪 test(client): compare settings scroll bounds at CSS pixel precision

This commit is contained in:
Saafo committed 2026-10-20 18:52:34 +08:00
1 parent 5c12422a52
commit fbc4bb02a0
1 file changed
+3 -2
+3 -2
View File
@@ -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')