fix: compact mobile bottom navigation
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user