storkit: merge 438_story_slash_command_autocomplete_in_web_ui_text_input

This commit is contained in:
dave
2026-03-28 22:09:36 +00:00
parent a53967453e
commit 5992f9bd19
10 changed files with 513 additions and 83 deletions
+24
View File
@@ -1481,6 +1481,10 @@ describe("Slash command handling (Story 374)", () => {
await act(async () => {
fireEvent.change(input, { target: { value: "/status" } });
});
// First Enter selects the command from the picker; second Enter submits it
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
@@ -1551,6 +1555,10 @@ describe("Slash command handling (Story 374)", () => {
await act(async () => {
fireEvent.change(input, { target: { value: "/git" } });
});
// First Enter selects the command from the picker; second Enter submits it
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
@@ -1569,6 +1577,10 @@ describe("Slash command handling (Story 374)", () => {
await act(async () => {
fireEvent.change(input, { target: { value: "/cost" } });
});
// First Enter selects the command from the picker; second Enter submits it
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
@@ -1595,6 +1607,10 @@ describe("Slash command handling (Story 374)", () => {
await act(async () => {
fireEvent.change(input, { target: { value: "/reset" } });
});
// First Enter selects the command from the picker; second Enter submits it
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
@@ -1634,6 +1650,10 @@ describe("Slash command handling (Story 374)", () => {
await act(async () => {
fireEvent.change(input, { target: { value: "/help" } });
});
// First Enter selects the command from the picker; second Enter submits it
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
@@ -1652,6 +1672,10 @@ describe("Slash command handling (Story 374)", () => {
await act(async () => {
fireEvent.change(input, { target: { value: "/git" } });
});
// First Enter selects the command from the picker; second Enter submits it
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
await act(async () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});