fix: remove completed filter click highlight
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 3m33s

This commit is contained in:
2026-09-20 07:09:00 +08:00
parent a877d341f7
commit 7f11d0ba78
3 changed files with 17 additions and 1 deletions
+14
View File
@@ -207,6 +207,20 @@ test('Today plain-list layout matches the approved responsive geometry', async (
expect(metrics.styles.filterVisualHeight).toBeLessThanOrEqual(36)
expect(metrics.styles.filterBackground).toBe('rgba(0, 0, 0, 0)')
expect(metrics.styles.filterBorderRadius).toBe('0px')
const filter = page.getByRole('switch', { name: '显示已完成' })
await filter.hover()
expect(await filter.evaluate(element => getComputedStyle(element).backgroundColor)).toBe('rgba(0, 0, 0, 0)')
await filter.evaluate((element) => {
element.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true, pointerType: 'mouse' }))
element.dispatchEvent(new MouseEvent('mousedown', { bubbles: true }))
})
expect(await filter.evaluate(element => getComputedStyle(element).backgroundColor)).toBe('rgba(0, 0, 0, 0)')
expect(await filter.evaluate(element => getComputedStyle(element).borderColor)).toBe('rgba(0, 0, 0, 0)')
expect(await filter.evaluate(element => getComputedStyle(element.querySelector<HTMLElement>('.completed-filter-pill__track')!).backgroundColor)).not.toBe('rgba(0, 0, 0, 0)')
await filter.evaluate((element) => {
element.dispatchEvent(new MouseEvent('mouseup', { bubbles: true }))
element.dispatchEvent(new PointerEvent('pointerup', { bubbles: true, pointerType: 'mouse' }))
})
expect(metrics.styles.headingDisplay).toBe('grid')
expect(metrics.styles.headingAlignItems).toBe('center')
expect(metrics.styles.filterTop).toBeGreaterThanOrEqual(metrics.ordered[1].top)