fix: remove completed filter click highlight
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user