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:
@@ -76,6 +76,24 @@ describe("Rule Component", () => {
|
||||
expect(handleClick).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it("renders as a link when href is set", () => {
|
||||
const handleClick = vi.fn();
|
||||
render(
|
||||
<Rule
|
||||
{...defaultProps}
|
||||
href="/create/review-template/consensus"
|
||||
onClick={handleClick}
|
||||
/>,
|
||||
);
|
||||
|
||||
const card = screen.getByRole("link", {
|
||||
name: "Learn more about Test Rule governance pattern",
|
||||
});
|
||||
expect(card).toHaveAttribute("href", "/create/review-template/consensus");
|
||||
fireEvent.click(card, { preventDefault() {} });
|
||||
expect(handleClick).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("applies hover effects correctly", () => {
|
||||
render(<Rule {...defaultProps} />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user