diff --git a/app/components/type/ContentLockup/ContentLockup.view.tsx b/app/components/type/ContentLockup/ContentLockup.view.tsx index 7b27738..224e6d8 100644 --- a/app/components/type/ContentLockup/ContentLockup.view.tsx +++ b/app/components/type/ContentLockup/ContentLockup.view.tsx @@ -94,9 +94,9 @@ function ContentLockupView({ )} {/* Link for feature variant */} - {variant === "feature" && linkText && ( + {variant === "feature" && linkText && linkHref && ( {linkText} diff --git a/messages/en/components/featureGrid.json b/messages/en/components/featureGrid.json index 16b331c..612d80e 100644 --- a/messages/en/components/featureGrid.json +++ b/messages/en/components/featureGrid.json @@ -1,7 +1,7 @@ { - "_comment": "FeatureGrid component defaults (shared across pages). linkHref is a stub until destination pages ship.", + "_comment": "FeatureGrid component defaults (shared across pages). Learn more goes to /learn; feature cards stay non-interactive until destinations are decided.", "linkText": "Learn more", - "linkHref": "#", + "linkHref": "/learn", "ariaLabel": "Feature tools and services", "features": { "decisionMaking": { diff --git a/stories/type/ContentLockup.stories.js b/stories/type/ContentLockup.stories.js index fd000a3..b113012 100644 --- a/stories/type/ContentLockup.stories.js +++ b/stories/type/ContentLockup.stories.js @@ -53,7 +53,7 @@ export const FeatureWithLink = { "Use our toolkit to improve, document, and evolve your organization.", variant: "feature", linkText: "Learn more", - linkHref: "#", + linkHref: "/learn", }, }; diff --git a/tests/components/FeatureGrid.test.tsx b/tests/components/FeatureGrid.test.tsx index f38d511..57f4cd8 100644 --- a/tests/components/FeatureGrid.test.tsx +++ b/tests/components/FeatureGrid.test.tsx @@ -57,6 +57,14 @@ describe("FeatureGrid (behavioral tests)", () => { ).not.toBeInTheDocument(); }); + it("sends Learn more to the Learn page", () => { + render(); + expect(screen.getByRole("link", { name: "Learn more" })).toHaveAttribute( + "href", + "/learn", + ); + }); + it("does not apply a focus ring to the entire grid shell", () => { render(); const shell = document.querySelector('[data-figma-node="18847-22410"]'); diff --git a/tests/e2e/critical-journeys.spec.ts b/tests/e2e/critical-journeys.spec.ts index d17fcc3..a08b94a 100644 --- a/tests/e2e/critical-journeys.spec.ts +++ b/tests/e2e/critical-journeys.spec.ts @@ -131,7 +131,10 @@ test.describe("Critical User Journeys", () => { await expect( featureSection.locator('a[href="#decision-making"]'), ).toHaveCount(0); - await expect(featureSection.getByRole("link", { name: "Learn more" })).toBeVisible(); + await expect(featureSection.getByRole("link", { name: "Learn more" })).toHaveAttribute( + "href", + "/learn", + ); }); test("header navigation functionality", async ({ page }) => { diff --git a/tests/pages/home.test.jsx b/tests/pages/home.test.jsx index 76ccad6..b86cd48 100644 --- a/tests/pages/home.test.jsx +++ b/tests/pages/home.test.jsx @@ -120,6 +120,8 @@ describe("Page", () => { "Use our toolkit to improve, document, and evolve your organization.", ).length, ).toBeGreaterThan(0); + const learnMore = screen.getAllByRole("link", { name: "Learn more" }); + expect(learnMore[0]).toHaveAttribute("href", "/learn"); }); test("renders ask organizer section with correct data", () => {