feat(frontend): slice 1 — foundation for MUI->shadcn migration
Web UI rework (openspec/changes/web-ui-rework). Foundation slice: - Add @tanstack/react-table; remove orphaned recharts, d3 - Vendor shadcn primitives: tabs table dialog input label checkbox switch progress separator avatar textarea dropdown-menu scroll-area - Add Vitest + @testing-library/react + jsdom harness; npm test script - Delete no-op theme.ts shim; remove getAppTheme references - Smoke test proves the harness Gate: build + lint + test green.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { Badge } from "../badge";
|
||||
|
||||
// Slice 1 harness smoke test: proves the Vitest + jsdom + Testing Library
|
||||
// harness runs and the new `success` Badge variant renders with the chart-2 cue.
|
||||
describe("Badge", () => {
|
||||
it("renders a success variant tagged with the chart-2 cue", () => {
|
||||
render(<Badge variant="success">Healthy</Badge>);
|
||||
const badge = screen.getByText("Healthy");
|
||||
expect(badge).toBeInTheDocument();
|
||||
expect(badge.getAttribute("data-variant")).toBe("success");
|
||||
expect(badge.className).toContain("bg-chart-2/10");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user