Fix failing Chat tests: correct tool call badge assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-20 15:51:47 +00:00
parent 01e7d67f1f
commit 97dcab3b98

View File

@@ -675,8 +675,8 @@ describe("Chat message rendering — unified tool call UI", () => {
}); });
expect(await screen.findByText("I'll read that file.")).toBeInTheDocument(); expect(await screen.findByText("I'll read that file.")).toBeInTheDocument();
// Tool call badge should appear showing the function name // Tool call badge should appear showing the function name and first arg
expect(await screen.findByText(/Read/)).toBeInTheDocument(); expect(await screen.findByText("Read(src/main.rs)")).toBeInTheDocument();
}); });
it("renders collapsible tool output for tool role messages (AC3)", async () => { 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); capturedWsHandlers?.onUpdate(messages);
}); });
expect(await screen.findByText(/Bash/)).toBeInTheDocument(); expect(await screen.findByText("Bash(cargo test)")).toBeInTheDocument();
expect(await screen.findByText(/Read/)).toBeInTheDocument(); expect(await screen.findByText("Read(Cargo.toml)")).toBeInTheDocument();
}); });
}); });