Send FeatureGrid Learn more to the Learn page instead of a dead hash link.
This commit is contained in:
@@ -57,6 +57,14 @@ describe("FeatureGrid (behavioral tests)", () => {
|
||||
).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", () => {
|
||||
render(<FeatureGrid title="Test" subtitle="Test" />);
|
||||
const shell = document.querySelector('[data-figma-node="18847-22410"]');
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user