From 97dcab3b983fd6da02148675171693d6915fafff Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 20 Feb 2026 15:51:47 +0000 Subject: [PATCH] Fix failing Chat tests: correct tool call badge assertions Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/Chat.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Chat.test.tsx b/frontend/src/components/Chat.test.tsx index 87ce0c9..df43e32 100644 --- a/frontend/src/components/Chat.test.tsx +++ b/frontend/src/components/Chat.test.tsx @@ -675,8 +675,8 @@ describe("Chat message rendering — unified tool call UI", () => { }); expect(await screen.findByText("I'll read that file.")).toBeInTheDocument(); - // Tool call badge should appear showing the function name - expect(await screen.findByText(/Read/)).toBeInTheDocument(); + // Tool call badge should appear showing the function name and first arg + expect(await screen.findByText("Read(src/main.rs)")).toBeInTheDocument(); }); it("renders collapsible tool output for tool role messages (AC3)", async () => { @@ -766,7 +766,7 @@ describe("Chat message rendering — unified tool call UI", () => { capturedWsHandlers?.onUpdate(messages); }); - expect(await screen.findByText(/Bash/)).toBeInTheDocument(); - expect(await screen.findByText(/Read/)).toBeInTheDocument(); + expect(await screen.findByText("Bash(cargo test)")).toBeInTheDocument(); + expect(await screen.findByText("Read(Cargo.toml)")).toBeInTheDocument(); }); });