summaryrefslogtreecommitdiffhomepage
path: root/src/features/chat/logic/composer.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-10-21 14:26:35 +0900
committerAdam Malczewski <[email protected]>2026-10-21 14:26:35 +0900
commit8eefbc5287f73414df7feba6c78dc8ca73783b1d (patch)
treeecb0b0286f22eb082c8c4cce6adf1d535b0b7fed /src/features/chat/logic/composer.test.ts
parenta7b041f0f8989373404c35d3fe4b20b1e89d2440 (diff)
downloaddispatch-web-8eefbc5287f73414df7feba6c78dc8ca73783b1d.tar.gz
dispatch-web-8eefbc5287f73414df7feba6c78dc8ca73783b1d.zip
fix(review-followup-fea): clarify Stop with queued input
Diffstat (limited to 'src/features/chat/logic/composer.test.ts')
-rw-r--r--src/features/chat/logic/composer.test.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/features/chat/logic/composer.test.ts b/src/features/chat/logic/composer.test.ts
new file mode 100644
index 0000000..6ef5eab
--- /dev/null
+++ b/src/features/chat/logic/composer.test.ts
@@ -0,0 +1,20 @@
+import { describe, expect, it } from "vitest";
+import { stopButtonLabels } from "./composer";
+
+describe("stopButtonLabels", () => {
+ it.each([undefined, 0])("preserves plain Stop with queued count %s", (count) => {
+ expect(stopButtonLabels(count)).toEqual({
+ text: "Stop",
+ ariaLabel: "Stop generation",
+ title: undefined,
+ });
+ });
+
+ it.each([1, 2])("describes interrupt-and-send with queued count %s", (count) => {
+ expect(stopButtonLabels(count)).toEqual({
+ text: "Interrupt & send queued",
+ ariaLabel: "Interrupt & send queued",
+ title: "Stop the current response and start the queued message now",
+ });
+ });
+});