improve test

This commit is contained in:
Jinjing
2026-08-31 18:13:56 -07:00
parent 127159f9f8
commit 3441d92a0a
@@ -88,6 +88,13 @@ describe('shouldHandleAutomationRunHistoryKey', () => {
expect(shouldHandleAutomationRunHistoryKey(makeEvent({ key: 'Enter', target: link }))).toBe(
false
)
const tabTrigger = document.createElement('div')
tabTrigger.setAttribute('role', 'tab')
expect(
shouldHandleAutomationRunHistoryKey(makeEvent({ key: 'Enter', target: tabTrigger }))
).toBe(false)
expect(
shouldHandleAutomationRunHistoryKey(makeEvent({ key: 'ArrowDown', target: button }))
).toBe(true)