Match the marketing homepage and About page to the latest Figma: black hero CTA, spaces in word-split headings, redesigned feature grid, and cited About statistics.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,27 @@ describe("AboutHeader", () => {
|
||||
expect(
|
||||
screen.getByRole("heading", { name: /CommunityRule helps/i }),
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByRole("heading").textContent).toMatch(
|
||||
/CommunityRule helps/,
|
||||
);
|
||||
expect(screen.getByRole("heading").textContent).not.toMatch(
|
||||
/CommunityRulehelps/,
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps spaces when icons sit between words", () => {
|
||||
render(
|
||||
<AboutHeader
|
||||
segments={[
|
||||
{ type: "word", text: "CommunityRule" },
|
||||
{ type: "icon", icon: "arrow" },
|
||||
{ type: "word", text: "is" },
|
||||
{ type: "word", text: "a" },
|
||||
]}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByRole("heading").textContent).toMatch(/CommunityRule is a/);
|
||||
});
|
||||
|
||||
it("sizes inline marks to the 320 / 640 / 1440 About Header variants", () => {
|
||||
|
||||
@@ -25,6 +25,24 @@ describe("ContentLockup", () => {
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("uses the inverse filled palette on the hero CTA", () => {
|
||||
renderWithProviders(
|
||||
<ContentLockup
|
||||
variant="hero"
|
||||
title="Collaborate"
|
||||
ctaText="Learn how CommunityRule works"
|
||||
ctaHref="/how-it-works"
|
||||
/>,
|
||||
);
|
||||
|
||||
const cta = screen.getAllByRole("link", {
|
||||
name: "Learn how CommunityRule works",
|
||||
})[0];
|
||||
expect(cta?.className).toContain(
|
||||
"bg-[var(--color-surface-default-primary)]",
|
||||
);
|
||||
});
|
||||
|
||||
it("uses Display line-height and Small/Paragraph on the hero lockup", () => {
|
||||
renderWithProviders(
|
||||
<ContentLockup
|
||||
|
||||
Reference in New Issue
Block a user