Keep the template picker in the create flow, make catalog cards real links, and stop showing a fake community when review has no draft.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import {
|
||||
renderWithProviders as render,
|
||||
screen,
|
||||
} from "../utils/test-utils";
|
||||
import { CreateFlowTemplatesPageClient } from "../../app/(app)/create/templates/CreateFlowTemplatesPageClient";
|
||||
import { GOVERNANCE_TEMPLATE_CATALOG } from "../../lib/templates/governanceTemplateCatalog";
|
||||
import "@testing-library/jest-dom/vitest";
|
||||
|
||||
describe("Create flow templates picker", () => {
|
||||
test("renders catalog cards as in-flow template review links", () => {
|
||||
render(
|
||||
<CreateFlowTemplatesPageClient
|
||||
initialGridEntries={GOVERNANCE_TEMPLATE_CATALOG}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Templates", level: 1 }),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole("link", { name: /Consensus/i }),
|
||||
).toHaveAttribute(
|
||||
"href",
|
||||
"/create/review-template/consensus?fromFlow=1",
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("link", { name: /Solidarity Network/i }),
|
||||
).toHaveAttribute(
|
||||
"href",
|
||||
"/create/review-template/solidarity-network?fromFlow=1",
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user