From 97deacd875450741f6c9637508b412f2c2678d08 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Thu, 9 Jul 2026 10:19:59 -0400 Subject: [PATCH] test(web): cover compact-layout expand toggle in HistoryEntry Adds a test that clicks Expand/Collapse in the embedded (compact) layout, exercising the ExpandToggle onToggle callback that was uncovered (line 193). Restores HistoryEntry.tsx to 100% coverage, fixing the CI per-file function-coverage gate failure (was 85.71%). Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw --- .../groups/HistoryEntry/HistoryEntry.test.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/clients/web/src/components/groups/HistoryEntry/HistoryEntry.test.tsx b/clients/web/src/components/groups/HistoryEntry/HistoryEntry.test.tsx index e144e65d..2abbb6fa 100644 --- a/clients/web/src/components/groups/HistoryEntry/HistoryEntry.test.tsx +++ b/clients/web/src/components/groups/HistoryEntry/HistoryEntry.test.tsx @@ -280,6 +280,18 @@ describe("HistoryEntry", () => { ).toBeInTheDocument(); }); + it("toggles the local expand/collapse state when clicking Expand/Collapse in the compact layout", async () => { + const user = userEvent.setup(); + renderWithMantine( + , + ); + expect(screen.getByRole("button", { name: "Expand" })).toBeInTheDocument(); + await user.click(screen.getByRole("button", { name: "Expand" })); + expect( + screen.getByRole("button", { name: "Collapse" }), + ).toBeInTheDocument(); + }); + it("starts expanded when isListExpanded is true and shows Parameters and Response", () => { renderWithMantine(