Files
ThothII/frontend/src/viewers/PreviewGrid.test.tsx
T
marcopanandClaude Fable 5 1c97289ed8 feat(frontend): v2 artifact viewers for cte_plan/cte_result/phase
Add CtePlanViewer, CteResultViewer, and PhaseSummaryViewer to render the
structured v2 payloads (schema_version: 2) the harness now emits for
artifact-gate widgets, per contracts.md. Extract PreviewGrid from
ResultsPanel as a reusable AG Grid component shared by CteResultViewer.
ArtifactView dispatches to the new viewers on a schema_version/shape
guard, falling back to the existing legacy renderers unchanged for
older sessions and replay fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 00:57:20 +02:00

14 lines
491 B
TypeScript

import { render, screen } from "@testing-library/react";
import { PreviewGrid } from "./PreviewGrid";
test("renders grid cells for the given columns and rows", () => {
render(
<PreviewGrid columns={["name", "age"]} rows={[["Alice", 30], ["Bob", 25]]} />
);
expect(screen.getByText("Alice")).toBeInTheDocument();
expect(screen.getByText("Bob")).toBeInTheDocument();
expect(screen.getByText("30")).toBeInTheDocument();
expect(screen.getByText("25")).toBeInTheDocument();
});