fix: improve cte review presentation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { render, screen, within } from "@testing-library/react";
|
||||
import { CtePlanViewer } from "./CtePlanViewer";
|
||||
import type { CtePlanV2 } from "./artifactV2";
|
||||
|
||||
@@ -56,6 +56,18 @@ test("renders one card per CTE with index badge, purpose, and filter value", ()
|
||||
expect(screen.getByText(/TRUE/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("renders each filter as aligned column, operator, and value fields", () => {
|
||||
render(<CtePlanViewer plan={plan} />);
|
||||
|
||||
const filter = screen.getByRole("group", { name: "Filter 1" });
|
||||
expect(within(filter).getByText("Column")).toBeInTheDocument();
|
||||
expect(within(filter).getByText("Operator")).toBeInTheDocument();
|
||||
expect(within(filter).getByText("Value")).toBeInTheDocument();
|
||||
expect(within(filter).getByText("pazienti.stato")).toBeInTheDocument();
|
||||
expect(within(filter).getByText("IS")).toBeInTheDocument();
|
||||
expect(within(filter).getByText("TRUE")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("shows 'no dependencies' for a CTE with an empty depends_on", () => {
|
||||
render(<CtePlanViewer plan={plan} />);
|
||||
expect(screen.getByText(/no dependencies/i)).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user