Skip to content

Commit fba5d1b

Browse files
committed
test(app-shell): press the dock chord with fireEvent, not a synthetic KeyboardEvent (ADR-0054 C1 lint)
Claude-Session: https://claude.ai/code/session_016WV4czF5gqc48r9LUsmRpw Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6dc4be9 commit fba5d1b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎ui/packages/app-shell/src/layout/__tests__/useConsoleChatDock.phoneCollapseOnNavigate-37556.test.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,10 @@ function mountAskPageHost(entry: string) {
339339
);
340340
}
341341

342-
const pressToggleChord = () =>
343-
act(() => {
344-
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'I', metaKey: true, shiftKey: true, bubbles: true }));
345-
});
342+
/** ⌘/Ctrl+Shift+I — the dock's own toggle, as a user presses it. */
343+
const pressToggleChord = () => {
344+
fireEvent.keyDown(document, { key: 'I', metaKey: true, shiftKey: true });
345+
};
346346
const rail = () => screen.queryByTestId('chat-dock-panel');
347347
const robot = () => screen.queryByTestId('topbar-ai-assistant');
348348

0 commit comments

Comments
 (0)