Match Home, top nav, hero, and logo wall to the current marketing frames.

Puts Workshops in the header, pairs the hero with a static rule card and breakpoint CTAs, and shows the three pilot marks with no wall label.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilalloandCursor committed 2026-11-02 18:50:32 -07:00
1 parent e12e06f7ce
commit 33cdaf135c
47 files changed
+728 -527

No files matched your search

+20 -35
View File
@@ -7,16 +7,16 @@ afterEach(() => {
cleanup();
});
describe("LogoWall Component", () => {
test("renders with default logos", () => {
test("renders the three pilot marks", () => {
render(<LogoWall />);
// Check for default logos
expect(screen.getByAltText("Boulder Street Medics")).toBeInTheDocument();
expect(screen.getByAltText("Food Not Bombs")).toBeInTheDocument();
expect(screen.getByAltText("Start COOP")).toBeInTheDocument();
expect(screen.getByAltText("Metagov")).toBeInTheDocument();
expect(screen.getByAltText("Open Civics")).toBeInTheDocument();
expect(screen.getByAltText("Mutual Aid CO")).toBeInTheDocument();
expect(screen.getByAltText("CU Boulder")).toBeInTheDocument();
expect(screen.getByAltText("Mutual Aid Colorado")).toBeInTheDocument();
expect(screen.queryByAltText("Start COOP")).not.toBeInTheDocument();
expect(screen.queryByAltText("Metagov")).not.toBeInTheDocument();
expect(screen.queryByAltText("Open Civics")).not.toBeInTheDocument();
expect(screen.queryByAltText("CU Boulder")).not.toBeInTheDocument();
});
test("renders with custom logos", () => {
@@ -25,13 +25,11 @@ describe("LogoWall Component", () => {
src: "assets/custom1.png",
alt: "Custom Logo 1",
size: "h-8",
order: "order-1",
},
{
src: "assets/custom2.png",
alt: "Custom Logo 2",
size: "h-10",
order: "order-2",
},
];
@@ -62,19 +60,15 @@ describe("LogoWall Component", () => {
);
});
test("applies responsive grid layout", () => {
test("lays out the three marks in a wrapping row", () => {
render(<LogoWall />);
const grid = document.querySelector(
'[class*="grid grid-cols-2 grid-rows-3"]',
);
expect(grid).toBeInTheDocument();
expect(grid).toHaveClass(
"sm:grid-cols-3",
"sm:grid-rows-2",
"md:flex",
"md:justify-between",
const row = document.querySelector('[class*="flex w-full flex-col"]');
expect(row).toBeInTheDocument();
expect(row).toHaveClass(
"sm:flex-row",
"md:flex-nowrap",
"md:justify-between",
"gap-[38.4px]",
);
});
@@ -97,7 +91,6 @@ describe("LogoWall Component", () => {
test("handles empty logos array", () => {
render(<LogoWall logos={[]} />);
// Should fall back to default logos
expect(screen.getByAltText("Food Not Bombs")).toBeInTheDocument();
});
@@ -112,15 +105,14 @@ describe("LogoWall Component", () => {
).toBe(0);
});
test("renders with proper semantic structure", () => {
test("renders with proper semantic structure and no heading", () => {
render(<LogoWall />);
const section = document.querySelector("section");
expect(section).toBeInTheDocument();
expect(
screen.getByText("Trusted by leading cooperators"),
).toBeInTheDocument();
screen.queryByText("Trusted by leading cooperators"),
).not.toBeInTheDocument();
});
test("renders partner logos at Figma 60% opacity", () => {
@@ -136,22 +128,15 @@ describe("LogoWall Component", () => {
const logos = screen.getAllByRole("img");
logos.forEach((logo) => {
// Next.js Image attributes are not rendered as HTML attributes in JSDOM
// Just verify the images are present
expect(logo).toBeInTheDocument();
});
});
test("prioritizes first two logos", () => {
test("marks the section with the Figma node id", () => {
render(<LogoWall />);
const logos = screen.getAllByRole("img");
const foodNotBombsLogo = logos.find((img) => img.alt === "Food Not Bombs");
const startCoopLogo = logos.find((img) => img.alt === "Start COOP");
// Next.js Image priority attribute is not rendered as HTML attribute in JSDOM
// Just verify the logos are present
expect(foodNotBombsLogo).toBeInTheDocument();
expect(startCoopLogo).toBeInTheDocument();
expect(
document.querySelector('[data-figma-node="18483-18425"]'),
).toBeInTheDocument();
});
});
+3 -1
View File
@@ -90,7 +90,9 @@ describe("RuleStack Component", () => {
test("defaults to home rule stack heading copy when namespace omitted", () => {
render(<RuleStack initialGridEntries={homeFeatured} />);
const heading = screen.getByRole("heading", { level: 2 });
expect(heading.textContent).toMatch(/Popular templates/);
expect(heading.textContent).toMatch(
/Get templates that help your community run smoothly/,
);
});
test("renders four featured governance template cards on the home row", async () => {