Hide unused helper marks on selection cards and modal section labels until tooltip behavior ships.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-21 16:28:38 -06:00
co-authored by Cursor
parent ef60175805
commit 440b6a9657
19 changed files with 92 additions and 25 deletions
+15
View File
@@ -65,6 +65,21 @@ describe("CardStack Component", () => {
expect(screen.getAllByText("Option C").length).toBeGreaterThanOrEqual(1);
});
test("hides helper icons on compact, expanded, and single-stack cards", () => {
const { unmount } = render(
<CardStack cards={SAMPLE_CARDS} expanded={false} />,
);
expect(screen.queryByText("?")).not.toBeInTheDocument();
unmount();
const expanded = render(<CardStack cards={SAMPLE_CARDS} expanded={true} />);
expect(screen.queryByText("?")).not.toBeInTheDocument();
expanded.unmount();
render(<CardStack cards={SAMPLE_CARDS} layout="singleStack" />);
expect(screen.queryByText("?")).not.toBeInTheDocument();
});
test("expanded tiles use the compact 142px CardSelection height", () => {
render(<CardStack cards={SAMPLE_CARDS} expanded={true} />);
+18
View File
@@ -54,6 +54,24 @@ describe("Selection Component", () => {
expect(card).toHaveClass("flex-row");
});
it("does not render a helper icon by default", () => {
render(<Selection {...defaultProps} orientation="vertical" />);
expect(screen.queryByText("?")).not.toBeInTheDocument();
});
it("renders a helper icon when showInfoIcon is true", () => {
render(
<Selection
{...defaultProps}
orientation="vertical"
showInfoIcon={true}
/>,
);
expect(screen.getByText("?")).toBeInTheDocument();
});
it("handles click events", () => {
const handleClick = vi.fn();
render(<Selection {...defaultProps} onClick={handleClick} />);