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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
This commit is contained in:
parent
32a3610737
commit
97deacd875
1 changed files with 12 additions and 0 deletions
|
|
@ -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(
|
||||
<HistoryEntry {...baseProps} entry={successEntry} embedded />,
|
||||
);
|
||||
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(
|
||||
<HistoryEntry
|
||||
|
|
|
|||
Loading…
Reference in a new issue