Right rail template

This commit is contained in:
adilallo
2026-02-28 23:16:10 -07:00
parent f5bfb25f5e
commit 0799636c78
60 changed files with 1255 additions and 305 deletions
+22 -7
View File
@@ -9,9 +9,24 @@ import { vi, describe, test, expect, afterEach } from "vitest";
import CardStack from "../../app/components/utility/CardStack";
const SAMPLE_CARDS = [
{ id: "1", label: "Option A", supportText: "Description A", recommended: true },
{ id: "2", label: "Option B", supportText: "Description B", recommended: false },
{ id: "3", label: "Option C", supportText: "Description C", recommended: true },
{
id: "1",
label: "Option A",
supportText: "Description A",
recommended: true,
},
{
id: "2",
label: "Option B",
supportText: "Description B",
recommended: false,
},
{
id: "3",
label: "Option C",
supportText: "Description C",
recommended: true,
},
];
afterEach(() => {
@@ -62,7 +77,9 @@ describe("CardStack Component", () => {
render(<CardStack cards={SAMPLE_CARDS} hasMore={false} />);
expect(
screen.queryByRole("button", { name: "See all communication approaches" }),
screen.queryByRole("button", {
name: "See all communication approaches",
}),
).not.toBeInTheDocument();
});
@@ -82,9 +99,7 @@ describe("CardStack Component", () => {
test("calls onCardSelect when a card is clicked", () => {
const onCardSelect = vi.fn();
render(
<CardStack cards={SAMPLE_CARDS} onCardSelect={onCardSelect} />,
);
render(<CardStack cards={SAMPLE_CARDS} onCardSelect={onCardSelect} />);
const cardButtons = screen.getAllByRole("button", {
name: "Option A: Description A",