QA pass: layout, create-flow, and About books #68

Merged
an.di merged 38 commits from adilallo/fix/CR-129-create-rule-button into main 2026-08-26 15:46:56 +00:00
6 changed files with 19 additions and 6 deletions
Showing only changes of commit d9751d7964 - Show all commits
@@ -94,9 +94,9 @@ function ContentLockupView({
)} )}
{/* Link for feature variant */} {/* Link for feature variant */}
{variant === "feature" && linkText && ( {variant === "feature" && linkText && linkHref && (
<a <a
href={linkHref || "#"} href={linkHref}
className="text-medium-underline underline text-[var(--color-content-default-primary)] hover:text-[var(--color-content-default-secondary)] transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-surface-default-brand-royal)] focus:ring-offset-2 focus:ring-offset-[var(--color-surface-default-secondary)] rounded-sm px-1 py-0.5" className="text-medium-underline underline text-[var(--color-content-default-primary)] hover:text-[var(--color-content-default-secondary)] transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-surface-default-brand-royal)] focus:ring-offset-2 focus:ring-offset-[var(--color-surface-default-secondary)] rounded-sm px-1 py-0.5"
> >
{linkText} {linkText}
+2 -2
View File
@@ -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", "linkText": "Learn more",
"linkHref": "#", "linkHref": "/learn",
"ariaLabel": "Feature tools and services", "ariaLabel": "Feature tools and services",
"features": { "features": {
"decisionMaking": { "decisionMaking": {
+1 -1
View File
@@ -53,7 +53,7 @@ export const FeatureWithLink = {
"Use our toolkit to improve, document, and evolve your organization.", "Use our toolkit to improve, document, and evolve your organization.",
variant: "feature", variant: "feature",
linkText: "Learn more", linkText: "Learn more",
linkHref: "#", linkHref: "/learn",
}, },
}; };
+8
View File
@@ -57,6 +57,14 @@ describe("FeatureGrid (behavioral tests)", () => {
).not.toBeInTheDocument(); ).not.toBeInTheDocument();
}); });
it("sends Learn more to the Learn page", () => {
render(<FeatureGrid title="Test" subtitle="Test" />);
expect(screen.getByRole("link", { name: "Learn more" })).toHaveAttribute(
"href",
"/learn",
);
});
it("does not apply a focus ring to the entire grid shell", () => { it("does not apply a focus ring to the entire grid shell", () => {
render(<FeatureGrid title="Test" subtitle="Test" />); render(<FeatureGrid title="Test" subtitle="Test" />);
const shell = document.querySelector('[data-figma-node="18847-22410"]'); const shell = document.querySelector('[data-figma-node="18847-22410"]');
+4 -1
View File
@@ -131,7 +131,10 @@ test.describe("Critical User Journeys", () => {
await expect( await expect(
featureSection.locator('a[href="#decision-making"]'), featureSection.locator('a[href="#decision-making"]'),
).toHaveCount(0); ).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 }) => { test("header navigation functionality", async ({ page }) => {
+2
View File
@@ -120,6 +120,8 @@ describe("Page", () => {
"Use our toolkit to improve, document, and evolve your organization.", "Use our toolkit to improve, document, and evolve your organization.",
).length, ).length,
).toBeGreaterThan(0); ).toBeGreaterThan(0);
const learnMore = screen.getAllByRole("link", { name: "Learn more" });
expect(learnMore[0]).toHaveAttribute("href", "/learn");
}); });
test("renders ask organizer section with correct data", () => { test("renders ask organizer section with correct data", () => {