Card compact and expanded template

This commit is contained in:
adilallo
2026-02-11 22:02:10 -07:00
parent f60df15c2b
commit b2ed1d438c
44 changed files with 1920 additions and 48 deletions
+23
View File
@@ -0,0 +1,23 @@
import { describe, test, expect } from "vitest";
import { screen } from "@testing-library/react";
import "@testing-library/jest-dom/vitest";
import { renderWithProviders } from "../utils/test-utils";
import Tag from "../../app/components/utility/Tag";
describe("Tag", () => {
test("renders with variant recommended and shows default label RECOMMENDED", () => {
renderWithProviders(<Tag variant="recommended" />);
expect(screen.getByText("RECOMMENDED")).toBeInTheDocument();
});
test("renders with variant selected and shows default label SELECTED", () => {
renderWithProviders(<Tag variant="selected" />);
expect(screen.getByText("SELECTED")).toBeInTheDocument();
});
test("renders custom children when provided", () => {
renderWithProviders(<Tag variant="recommended">Custom label</Tag>);
expect(screen.getByText("Custom label")).toBeInTheDocument();
expect(screen.queryByText("RECOMMENDED")).not.toBeInTheDocument();
});
});