Fix tests after ts change
CI Pipeline / test (20) (pull_request) Successful in 2m41s
CI Pipeline / test (18) (pull_request) Successful in 3m21s
CI Pipeline / e2e (chromium) (pull_request) Failing after 1m25s
CI Pipeline / e2e (firefox) (pull_request) Failing after 1m24s
CI Pipeline / e2e (webkit) (pull_request) Failing after 1m24s
CI Pipeline / visual-regression (pull_request) Failing after 1m53s
CI Pipeline / performance (pull_request) Failing after 1m31s
CI Pipeline / lint (pull_request) Failing after 1m5s
CI Pipeline / storybook (pull_request) Successful in 1m36s
CI Pipeline / build (pull_request) Failing after 1m19s
CI Pipeline / test (20) (pull_request) Successful in 2m41s
CI Pipeline / test (18) (pull_request) Successful in 3m21s
CI Pipeline / e2e (chromium) (pull_request) Failing after 1m25s
CI Pipeline / e2e (firefox) (pull_request) Failing after 1m24s
CI Pipeline / e2e (webkit) (pull_request) Failing after 1m24s
CI Pipeline / visual-regression (pull_request) Failing after 1m53s
CI Pipeline / performance (pull_request) Failing after 1m31s
CI Pipeline / lint (pull_request) Failing after 1m5s
CI Pipeline / storybook (pull_request) Successful in 1m36s
CI Pipeline / build (pull_request) Failing after 1m19s
This commit is contained in:
@@ -14,7 +14,7 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Check that CommunityRule branding appears in both header and footer
|
||||
@@ -30,31 +30,33 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Header navigation items
|
||||
expect(
|
||||
screen.getAllByRole("menuitem", { name: "Navigate to Use cases page" })
|
||||
.length,
|
||||
.length
|
||||
).toBeGreaterThan(0);
|
||||
expect(
|
||||
screen.getAllByRole("menuitem", { name: "Navigate to Learn page" })
|
||||
.length,
|
||||
screen.getAllByRole("menuitem", { name: "Navigate to Learn page" }).length
|
||||
).toBeGreaterThan(0);
|
||||
expect(
|
||||
screen.getAllByRole("menuitem", { name: "Navigate to About page" })
|
||||
.length,
|
||||
screen.getAllByRole("menuitem", { name: "Navigate to About page" }).length
|
||||
).toBeGreaterThan(0);
|
||||
|
||||
// Footer navigation items (should be present in footer as well)
|
||||
const useCasesLinks = screen.getAllByRole("link", { name: "Use cases" });
|
||||
const learnLinks = screen.getAllByRole("link", { name: "Learn" });
|
||||
const aboutLinks = screen.getAllByRole("link", { name: "About" });
|
||||
// Footer has navigation links that match header
|
||||
const footerUseCasesLinks = screen.getAllByRole("link", {
|
||||
name: "Use cases",
|
||||
});
|
||||
const footerLearnLinks = screen.getAllByRole("link", { name: "Learn" });
|
||||
const footerAboutLinks = screen.getAllByRole("link", { name: "About" });
|
||||
|
||||
expect(useCasesLinks.length).toBeGreaterThan(0);
|
||||
expect(learnLinks.length).toBeGreaterThan(0);
|
||||
expect(aboutLinks.length).toBeGreaterThan(0);
|
||||
// Check that footer has these links (they may be in header too, so getAllByRole will find both)
|
||||
expect(footerUseCasesLinks.length).toBeGreaterThan(0);
|
||||
expect(footerLearnLinks.length).toBeGreaterThan(0);
|
||||
expect(footerAboutLinks.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test("header navigation is interactive", async () => {
|
||||
@@ -94,23 +96,23 @@ describe("Layout Integration", () => {
|
||||
// Contact information
|
||||
expect(screen.getByText("medlab@colorado.edu")).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole("link", { name: "medlab@colorado.edu" }),
|
||||
screen.getByRole("link", { name: "medlab@colorado.edu" })
|
||||
).toHaveAttribute("href", "mailto:medlab@colorado.edu");
|
||||
|
||||
// Social media links
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Follow us on Bluesky" }),
|
||||
screen.getByRole("link", { name: "Follow us on Bluesky" })
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Follow us on GitLab" }),
|
||||
screen.getByRole("link", { name: "Follow us on GitLab" })
|
||||
).toBeInTheDocument();
|
||||
|
||||
// Legal links
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Privacy Policy" }),
|
||||
screen.getByRole("link", { name: "Privacy Policy" })
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Terms of Service" }),
|
||||
screen.getByRole("link", { name: "Terms of Service" })
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -136,7 +138,7 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Header should have banner role
|
||||
@@ -157,7 +159,7 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Header should have responsive navigation elements
|
||||
@@ -174,7 +176,7 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Get all interactive elements
|
||||
@@ -197,7 +199,7 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Header provides main navigation
|
||||
@@ -217,7 +219,7 @@ describe("Layout Integration", () => {
|
||||
<div>
|
||||
<Header />
|
||||
<Footer />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
|
||||
// Main navigation in header
|
||||
@@ -230,13 +232,13 @@ describe("Layout Integration", () => {
|
||||
(link) =>
|
||||
link.textContent?.includes("Use cases") ||
|
||||
link.textContent?.includes("Learn") ||
|
||||
link.textContent?.includes("About"),
|
||||
link.textContent?.includes("About")
|
||||
);
|
||||
expect(navigationLinks.length).toBeGreaterThan(0);
|
||||
|
||||
// Contact information in footer
|
||||
expect(
|
||||
screen.getByRole("link", { name: "medlab@colorado.edu" }),
|
||||
screen.getByRole("link", { name: "medlab@colorado.edu" })
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user