fix: restore Today floating add button
This commit is contained in:
@@ -54,7 +54,8 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
environmentHeight: width >= 721 ? 55 : width === 375 ? 79 : 81,
|
||||
})
|
||||
await expect(page.locator('.today-heading')).toHaveCount(1)
|
||||
await expect(page.locator('.today-inline-add')).toHaveCount(1)
|
||||
await expect(page.locator('.today-inline-add')).toHaveCount(0)
|
||||
await expect(page.locator('.unified-fab')).toHaveCount(1)
|
||||
await expect(taskRowLocator).toHaveCount(1)
|
||||
await expect(habitRowLocator).toHaveCount(1)
|
||||
await expect(page.locator('.today-environment')).toBeVisible()
|
||||
@@ -72,7 +73,6 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
const filter = document.querySelector<HTMLElement>('.today-inline-filter')!
|
||||
const firstSection = document.querySelector<HTMLElement>('.today-section-toggle')!
|
||||
const heading = document.querySelector<HTMLElement>('.today-heading')!
|
||||
const inlineAdd = document.querySelector<HTMLElement>('.today-inline-add')!
|
||||
const main = document.querySelector<HTMLElement>('main.today-main')!
|
||||
const content = rect('.today-context')
|
||||
const sectionTitle = firstSection.querySelector<HTMLElement>('.today-section-title')!
|
||||
@@ -145,9 +145,6 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
headingAlignItems: getComputedStyle(heading).alignItems,
|
||||
filterTop: filter.getBoundingClientRect().top,
|
||||
filterRight: filter.getBoundingClientRect().right,
|
||||
inlineAddPosition: getComputedStyle(inlineAdd).position,
|
||||
inlineAddWidth: inlineAdd.getBoundingClientRect().width,
|
||||
inlineAddBottom: inlineAdd.getBoundingClientRect().bottom,
|
||||
viewportHeight: innerHeight,
|
||||
titleFontSize: getComputedStyle(title).fontSize,
|
||||
titleFontWeight: getComputedStyle(title).fontWeight,
|
||||
@@ -206,13 +203,9 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
expect(metrics.styles.filterTop).toBeGreaterThanOrEqual(metrics.ordered[1].top)
|
||||
expect(metrics.styles.filterTop).toBeLessThanOrEqual(metrics.ordered[1].bottom - metrics.styles.filterHeight)
|
||||
expect(metrics.styles.filterRight).toBeCloseTo(metrics.content.right, 0)
|
||||
expect(metrics.styles.inlineAddPosition).toBe('relative')
|
||||
expect(metrics.styles.inlineAddWidth).toBeCloseTo(metrics.content.width, 0)
|
||||
expect(metrics.styles.inlineAddBottom).toBeGreaterThanOrEqual(metrics.ordered[metrics.ordered.length - 1].bottom)
|
||||
expect(metrics.styles.inlineAddBottom).toBeLessThanOrEqual(metrics.styles.viewportHeight + 1)
|
||||
if (width <= 720) expect(metrics.styles.contextHeight).toBeLessThanOrEqual(210)
|
||||
expect(metrics.styles.fabShadow).toBe('')
|
||||
expect(metrics.styles.fabIconWidth).toBe(0)
|
||||
expect(metrics.styles.fabShadow).toContain('8px 18px')
|
||||
expect(metrics.styles.fabIconWidth).toBeCloseTo(30, 0)
|
||||
if (width >= 721) {
|
||||
expect(metrics.uniqueRows).toHaveLength(1)
|
||||
expect(metrics.content.width).toBeCloseTo(width >= 1440 ? 1080 : 630, 0)
|
||||
|
||||
Reference in New Issue
Block a user