From 3441d92a0a957caf05e8f4ff95ca515e196cdd00 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Mon, 31 Aug 2026 18:13:56 -0700 Subject: [PATCH] improve test --- .../automation-run-history-keyboard-navigation.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.test.ts b/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.test.ts index 8951d320205..7316454ad7e 100644 --- a/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.test.ts +++ b/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.test.ts @@ -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)