Skip to content

Commit c0f0058

Browse files
committed
test(webapp): point the Cmd-I shortcut assertion at the real export
LEGACY_ASK_AI_SHORTCUT no longer exists, so the import was undefined and the assertion passed vacuously. Uses ASK_AI_SHORTCUT from ask-ai-channels and pins its key and modifiers.
1 parent 8bb665e commit c0f0058

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

apps/webapp/app/components/dashboard-agent/agent-shortcuts.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { describe, expect, it } from "vitest";
22
import { hotkeyOptions } from "~/hooks/useShortcutKeys";
3-
import { LEGACY_ASK_AI_SHORTCUT, TOGGLE_PANEL_SHORTCUT } from "./dashboardAgentLauncher";
3+
import { ASK_AI_SHORTCUT } from "./ask-ai-channels";
4+
import { TOGGLE_PANEL_SHORTCUT } from "./dashboardAgentLauncher";
45

56
const enabled = { isEnabled: true };
67

@@ -20,9 +21,9 @@ describe("the agent's shortcuts", () => {
2021
});
2122

2223
it("leaves Cmd-I's default alone", () => {
23-
expect(hotkeyOptions({ shortcut: LEGACY_ASK_AI_SHORTCUT, ...enabled }).preventDefault).toBe(
24-
false
25-
);
24+
expect(ASK_AI_SHORTCUT.key).toBe("i");
25+
expect(ASK_AI_SHORTCUT.modifiers).toEqual(["mod"]);
26+
expect(hotkeyOptions({ shortcut: ASK_AI_SHORTCUT, ...enabled }).preventDefault).toBe(false);
2627
});
2728
});
2829

0 commit comments

Comments
 (0)