Link every Home feature card to the page that covers it, and keep Ask an organizer from adding a second heading.
This commit is contained in:
1 parent
d3acd9aa9a
commit
dc9625c3b2
9 files changed
+119
-49
No files matched your search
@@ -124,6 +124,53 @@ describe("Page", () => {
|
||||
name: "Explore the patterns",
|
||||
});
|
||||
expect(learnMore[0]).toHaveAttribute("href", "/templates");
|
||||
expect(
|
||||
screen.getByRole("link", { name: /Choose how you decide/ }),
|
||||
).toHaveAttribute("href", "/blog/making-decisions-without-hierarchy");
|
||||
expect(
|
||||
screen.getByRole("link", { name: /Name your values/ }),
|
||||
).toHaveAttribute("href", "/how-it-works");
|
||||
expect(
|
||||
screen.getByRole("link", { name: /Define membership/ }),
|
||||
).toHaveAttribute(
|
||||
"href",
|
||||
"/blog/integrating-new-members-without-dilution",
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("link", { name: /Plan for conflict/ }),
|
||||
).toHaveAttribute("href", "/blog/resolving-active-conflicts");
|
||||
});
|
||||
|
||||
test("keeps a single page heading and leaves Card Steps unlinked", async () => {
|
||||
render(<Page />);
|
||||
|
||||
expect(
|
||||
screen.getByRole("heading", { level: 1, name: "Build structure" }),
|
||||
).toBeInTheDocument();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
screen.getByRole("heading", {
|
||||
name: "Tools for the parts that get hard",
|
||||
}),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
expect(screen.getAllByRole("heading", { level: 1 })).toHaveLength(1);
|
||||
expect(
|
||||
screen.getByRole("heading", {
|
||||
level: 2,
|
||||
name: "Tools for the parts that get hard",
|
||||
}).tagName,
|
||||
).toBe("H2");
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Still have questions?" }).tagName,
|
||||
).toBe("H2");
|
||||
expect(
|
||||
screen.queryByRole("link", {
|
||||
name: /See what has worked for other communities/,
|
||||
}),
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("renders ask organizer section with correct data", () => {
|
||||
|
||||
@@ -187,6 +187,7 @@ describe("Page Flow Integration", () => {
|
||||
|
||||
const headings = screen.getAllByRole("heading");
|
||||
expect(headings.length).toBeGreaterThan(4);
|
||||
expect(screen.getAllByRole("heading", { level: 1 })).toHaveLength(1);
|
||||
|
||||
const mainContent = screen.getByText(
|
||||
/Strong communities agree on four things early/,
|
||||
|
||||
Reference in new issue
Block a user