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

+22 -20
View File
@@ -7,40 +7,40 @@ test.describe("Critical User Journeys", () => {
test("complete user journey: learn about CommunityRule", async ({ page }) => {
// 1. User lands on homepage
await expect(page.locator("text=Collaborate")).toBeVisible();
await expect(page.locator("text=Build structure")).toBeVisible();
// 2. User reads hero section
await expect(
page.locator("text=Help your community make important decisions"),
page.locator("text=Strong communities agree on four things early"),
).toBeVisible();
// 3. User clicks CTA to learn more
const learnCta = page
.getByRole("link", { name: /Learn how CommunityRule works/i })
.or(page.getByRole("button", { name: /Learn how CommunityRule works/i }))
.getByRole("link", { name: /Talk to a facilitator/i })
.or(page.getByRole("button", { name: /Talk to a facilitator/i }))
.first();
if ((await learnCta.count()) > 0 && (await learnCta.isVisible())) {
await learnCta.click();
await expect(page).toHaveURL(/\/how-it-works/);
await expect(page).toHaveURL(/\/workshops/);
}
// 4. User scrolls to CardSteps section (home)
// Note: mobile title is one line; lg+ uses stacked "How / CommunityRule / helps" from home copy
const howItWorksHeading = page.locator(
'h2:has-text("How CommunityRule works"), h2:has-text("How"), h2:has-text("CommunityRule"), h2:has-text("helps")',
'h2:has-text("How CommunityRule helps"), h2:has-text("How"), h2:has-text("CommunityRule"), h2:has-text("helps")',
);
await expect(howItWorksHeading).toBeVisible();
// 5. User reads the process steps
await expect(
page.locator("text=Document how your community makes decisions"),
page.locator("text=See what has worked for other communities"),
).toBeVisible();
await expect(
page.locator("text=Build an operating manual for a successful community"),
page.locator("text=Decide how you will decide, while things are calm"),
).toBeVisible();
await expect(
page.locator(
"text=Get a link to your manual for your group to review and evolve",
"text=Invite your members and change it together as you grow",
),
).toBeVisible();
@@ -87,20 +87,22 @@ test.describe("Critical User Journeys", () => {
// Check main sections are present
await expect(
page.locator("h1, h2").filter({ hasText: "Collaborate" }),
page.locator("h1, h2").filter({ hasText: "Build structure" }),
).toBeVisible();
const howItWorksHeading = page.locator(
'h2:has-text("How CommunityRule works"), h2:has-text("How CommunityRule helps")',
'h2:has-text("How CommunityRule helps"), h2:has-text("How CommunityRule helps")',
);
await expect(howItWorksHeading).toBeVisible();
await expect(
page.locator("h1").filter({ hasText: "Tools for the parts that get hard" }),
page.locator("h2").filter({ hasText: "Tools for the parts that get hard" }),
).toBeVisible();
// Check key components are rendered
await expect(page.locator('img[alt="Hero illustration"]')).toBeVisible();
await expect(
page.getByRole("heading", { name: "CommunityRule Creative Team" }),
).toBeVisible();
await expect(page.locator('img[alt="Food Not Bombs"]')).toBeVisible();
await expect(page.locator("text=Jo Freeman")).toBeVisible();
});
@@ -108,11 +110,11 @@ test.describe("Critical User Journeys", () => {
test("feature grid section functionality", async ({ page }) => {
// Check section header
await expect(
page.locator('h1:has-text("Tools for the parts that get hard")'),
page.locator('h2:has-text("Tools for the parts that get hard")'),
).toBeVisible();
await expect(
page.locator(
"text=Every group runs into the same knots. CommunityRule gives you a way through",
"text=Every community runs into the same knots. CommunityRule gives you a way through",
),
).toBeVisible();
@@ -127,12 +129,12 @@ test.describe("Critical User Journeys", () => {
featureSection.locator("text=Plan for conflict"),
).toBeVisible();
// Feature tiles are presentational — only the lockup "Explore the toolkit" is a link
// Feature tiles are presentational — only the lockup "Explore the patterns" is a link
await expect(
featureSection.locator('a[href="#decision-making"]'),
).toHaveCount(0);
await expect(
featureSection.getByRole("link", { name: "Explore the toolkit" }),
featureSection.getByRole("link", { name: "Explore the patterns" }),
).toHaveAttribute("href", "/learn");
});
@@ -186,19 +188,19 @@ test.describe("Critical User Journeys", () => {
// Test mobile viewport
await page.setViewportSize({ width: 375, height: 667 });
await expect(
page.locator("h1, h2").filter({ hasText: "Collaborate" }),
page.locator("h1, h2").filter({ hasText: "Build structure" }),
).toBeVisible();
// Test tablet viewport
await page.setViewportSize({ width: 768, height: 1024 });
await expect(
page.locator("h1, h2").filter({ hasText: "Collaborate" }),
page.locator("h1, h2").filter({ hasText: "Build structure" }),
).toBeVisible();
// Test desktop viewport
await page.setViewportSize({ width: 1440, height: 900 });
await expect(
page.locator("h1, h2").filter({ hasText: "Collaborate" }),
page.locator("h1, h2").filter({ hasText: "Build structure" }),
).toBeVisible();
});
});
+17 -48
View File
@@ -18,7 +18,7 @@ test.describe("Edge Cases and Error Scenarios", () => {
await page.goto("/", { waitUntil: "domcontentloaded", timeout: 10000 });
// Page should still load eventually
await expect(page.locator("text=Collaborate")).toBeVisible({
await expect(page.locator("text=Build structure")).toBeVisible({
timeout: 10000,
});
});
@@ -38,7 +38,7 @@ test.describe("Edge Cases and Error Scenarios", () => {
await expect(body).toBeVisible();
// Verify key content is still accessible
await expect(page.locator("text=Collaborate")).toBeVisible();
await expect(page.locator("text=Build structure")).toBeVisible();
});
test("handles JavaScript errors gracefully", async ({ page }) => {
@@ -59,30 +59,19 @@ test.describe("Edge Cases and Error Scenarios", () => {
});
// Page should continue to function
await expect(page.locator("text=Collaborate")).toBeVisible();
await expect(page.locator("text=Build structure")).toBeVisible();
const learnCta = page
.getByRole("link", { name: /Learn how CommunityRule works/i })
.or(page.getByRole("button", { name: /Learn how CommunityRule works/i }));
const ctaCount = await learnCta.count();
let visibleCta = null;
for (let i = 0; i < ctaCount; i++) {
const cta = learnCta.nth(i);
if (await cta.isVisible()) {
visibleCta = cta;
break;
}
const createCta = page.getByRole("button", { name: "Create rule" });
const facilitatorCta = page.getByRole("link", {
name: /Talk to a facilitator/i,
});
const visibleCreate = createCta.filter({ has: page.locator(":visible") });
if ((await visibleCreate.count()) > 0) {
await visibleCreate.first().click();
await expect(page).toHaveURL(/\/create/);
} else {
await expect(facilitatorCta.first()).toBeVisible();
}
if (!visibleCta) {
throw new Error(
'No visible "Learn how CommunityRule works" CTA found',
);
}
await visibleCta.click();
await expect(page).toHaveURL(/\/how-it-works/);
});
test("handles missing images gracefully", async ({ page }) => {
@@ -96,29 +85,9 @@ test.describe("Edge Cases and Error Scenarios", () => {
await page.goto("/", { waitUntil: "domcontentloaded" });
// Page should still function without images
await expect(page.locator("text=Collaborate")).toBeVisible();
const learnCta = page
.getByRole("link", { name: /Learn how CommunityRule works/i })
.or(page.getByRole("button", { name: /Learn how CommunityRule works/i }));
const ctaCount = await learnCta.count();
let visibleCta = null;
for (let i = 0; i < ctaCount; i++) {
const cta = learnCta.nth(i);
if (await cta.isVisible()) {
visibleCta = cta;
break;
}
}
if (!visibleCta) {
throw new Error(
'No visible "Learn how CommunityRule works" CTA found',
);
}
await visibleCta.click();
await expect(page).toHaveURL(/\/how-it-works/);
await expect(page.locator("text=Build structure")).toBeVisible();
await expect(
page.getByRole("heading", { name: "CommunityRule Creative Team" }),
).toBeVisible();
});
});