fix: compact mobile bottom navigation
ci / gitleaks (push) Successful in 8s
ci / docker (push) Successful in 3m40s

This commit is contained in:
2026-09-18 08:58:41 +08:00
parent 7bfc5d2a44
commit 4d5d1f46e0
5 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ test('bottom navigation uses the paper baseline geometry', async ({ page }) => {
}
})
expect(metrics.documentOverflow).toBe(0)
expect(metrics.nav).toEqual({ left: 0, right: metrics.viewportWidth, bottom: page.viewportSize()!.height, width: metrics.viewportWidth, height: 64 })
expect(metrics.nav).toEqual({ left: 0, right: metrics.viewportWidth, bottom: page.viewportSize()!.height, width: metrics.viewportWidth, height: 56 })
expect(Math.max(...metrics.buttonWidths) - Math.min(...metrics.buttonWidths)).toBeLessThanOrEqual(1)
expect(metrics.buttonHeights.every(height => height >= 44)).toBeTruthy()
expect(metrics.background).toBe('rgb(255, 253, 248)')
@@ -70,11 +70,11 @@ test('bottom navigation keeps its safe-area gap after dragging', async ({ page }
const nav = page.locator('.bottom')
await expect(nav).toBeVisible()
await page.locator('html').evaluate(element => element.style.setProperty('--safe-area-bottom', '34px', 'important'))
await expect.poll(() => nav.evaluate(element => getComputedStyle(element).height)).toBe('98px')
await expect.poll(() => nav.evaluate(element => getComputedStyle(element).height)).toBe('90px')
const navBox = await nav.boundingBox()
expect(navBox).not.toBeNull()
expect(navBox!.height).toBe(98)
expect(navBox!.height).toBe(90)
const fab = page.locator('.unified-fab')
const fabBox = await fab.boundingBox()