Match Rule card type and section gaps to the template grid.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-18 20:56:02 -06:00
co-authored by Cursor
parent b6cf980d23
commit 73cb73a5af
4 changed files with 59 additions and 22 deletions
+5
View File
@@ -188,6 +188,10 @@ describe("RuleStack Component", () => {
expect(section).toHaveClass("px-[20px]", "py-[32px]");
expect(section?.className).toMatch(/min-\[640px\]:px-\[32px\]/);
expect(section?.className).toMatch(/min-\[640px\]:py-\[48px\]/);
expect(section?.className).toMatch(/gap-\[24px\]/);
expect(section?.className).toMatch(/min-\[768px\]:gap-\[32px\]/);
expect(section?.className).toMatch(/min-\[1024px\]:gap-\[40px\]/);
expect(section?.className).not.toMatch(/min-\[640px\]:gap-\[32px\]/);
});
test("applies responsive grid layout", async () => {
@@ -338,6 +342,7 @@ describe("RuleStack Component", () => {
.getByRole("link", { name: "See all templates" })
.closest("div");
expect(linkContainer).toHaveClass("flex", "justify-center");
expect(linkContainer?.className).not.toMatch(/mt-\[/);
});
test("falls back to static catalog when templates API errors", async () => {