summaryrefslogtreecommitdiffhomepage
path: root/src/features/chat/ui.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-10-21 20:11:33 +0900
committerAdam Malczewski <[email protected]>2026-10-21 20:11:33 +0900
commit564b2c1d03cf477d7cfc23414b60d1ec76904ecc (patch)
tree16fc1956bb6cd7b83894104b24b9f02acd0751ec /src/features/chat/ui.test.ts
parent7b7d6d01cf94ecad1dcaaa4b87670d50fe15790a (diff)
downloaddispatch-web-564b2c1d03cf477d7cfc23414b60d1ec76904ecc.tar.gz
dispatch-web-564b2c1d03cf477d7cfc23414b60d1ec76904ecc.zip
fix(chat): delay delivery warning and shorten queued action label
Wait one second before displaying pending-input recovery UI, cancelling on confirmation or removal. Label the queued-message stop action Flush without changing behavior. Verified: 2451 frontend tests passed twice, typecheck, Biome, and build.
Diffstat (limited to 'src/features/chat/ui.test.ts')
-rw-r--r--src/features/chat/ui.test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/features/chat/ui.test.ts b/src/features/chat/ui.test.ts
index 480d593..74c0619 100644
--- a/src/features/chat/ui.test.ts
+++ b/src/features/chat/ui.test.ts
@@ -871,14 +871,14 @@ describe("Composer", () => {
for (const queuedMessageCount of [1, 2]) {
await rerender({ queuedMessageCount });
- const button = screen.getByRole("button", { name: "Interrupt & send queued" });
- expect(button).toHaveTextContent(/^Interrupt & send queued$/);
+ const button = screen.getByRole("button", { name: "Flush" });
+ expect(button).toHaveTextContent(/^Flush$/);
expect(button).toHaveAttribute(
"title",
"Stop the current response and start the queued message now",
);
}
- await user.click(screen.getByRole("button", { name: "Interrupt & send queued" }));
+ await user.click(screen.getByRole("button", { name: "Flush" }));
expect(onStop).toHaveBeenCalledTimes(2);
expect(onSend).not.toHaveBeenCalled();
expect(onQueue).not.toHaveBeenCalled();
@@ -886,10 +886,10 @@ describe("Composer", () => {
const input = screen.getByRole("textbox", { name: "Message input" });
await user.type(input, "next");
expect(screen.getByRole("button", { name: "Queue" })).toBeInTheDocument();
- expect(screen.queryByRole("button", { name: "Interrupt & send queued" })).toBeNull();
+ expect(screen.queryByRole("button", { name: "Flush" })).toBeNull();
await user.click(screen.getByRole("button", { name: "Queue" }));
expect(onQueue).toHaveBeenCalledExactlyOnceWith("next", undefined);
- expect(screen.getByRole("button", { name: "Interrupt & send queued" })).toBeInTheDocument();
+ expect(screen.getByRole("button", { name: "Flush" })).toBeInTheDocument();
await rerender({ queuedMessageCount: 0 });
expectPlainStop(); // Queue drained or cancelled.
await rerender({ queuedMessageCount: 1, status: "idle" });