Skip to content

Commit 6c5296a

Browse files
only21milclaude
andcommitted
test(web): cover composing arrow keys in settings search
The composition guard also skips ArrowUp and ArrowDown while composing; the table now checks both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 497bf30 commit 6c5296a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/settings/SettingsSidebarNav.composition.browser.test.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ vi.mock("./useAvailableSettingsSearchItems", () => ({
1111
],
1212
}));
1313

14-
it("keeps composition Enter and Escape in the search from navigating or clearing", async () => {
14+
it("ignores composing keys in the search", async () => {
1515
await using screen = await render(
1616
<SidebarProvider defaultOpen>
1717
<SettingsSidebarNav pathname="/settings/general" />
@@ -27,6 +27,8 @@ it("keeps composition Enter and Escape in the search from navigating or clearing
2727
{ key: "Enter", isComposing: false, keyCode: 229 },
2828
{ key: "Escape", isComposing: true, keyCode: 27 },
2929
{ key: "Escape", isComposing: false, keyCode: 229 },
30+
{ key: "ArrowDown", isComposing: true, keyCode: 40 },
31+
{ key: "ArrowUp", isComposing: true, keyCode: 38 },
3032
]) {
3133
const event = new KeyboardEvent("keydown", { ...composition, bubbles: true, cancelable: true });
3234
await act(() => search.element().dispatchEvent(event));

0 commit comments

Comments
 (0)