Fix unit tests

This commit is contained in:
adilallo
2025-08-28 22:26:21 -06:00
parent 382f4a7541
commit c1122c8426
5 changed files with 75 additions and 43 deletions
+8 -12
View File
@@ -35,13 +35,11 @@ describe("NumberedCards Component", () => {
/>
);
// Check for the heading (it contains both mobile and desktop versions)
expect(screen.getByRole("heading")).toBeInTheDocument();
// Check for the subtitle text
expect(
screen.getByRole("heading", { name: "How CommunityRule helps" })
).toBeInTheDocument();
expect(
screen.getByRole("heading", {
name: "Build better communities step by step",
})
screen.getByText("Build better communities step by step")
).toBeInTheDocument();
// Check for card content
@@ -65,12 +63,10 @@ describe("NumberedCards Component", () => {
/>
);
expect(
screen.getByRole("heading", { name: "Test Title" })
).toBeInTheDocument();
expect(
screen.getByRole("heading", { name: "Test Subtitle" })
).toBeInTheDocument();
// Check for the heading (it contains both mobile and desktop versions)
expect(screen.getByRole("heading")).toBeInTheDocument();
// Check for the subtitle text
expect(screen.getByText("Test Subtitle")).toBeInTheDocument();
});
test("renders NumberedCard components with correct props", () => {