Match Rule card type and section gaps to the template grid.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user