Skip to content

Commit

Permalink
fix: Unit test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Jan 24, 2025
1 parent b957bd1 commit 5826f73
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/(proper_react)/(redesign)/MobileShell.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ describe("MobileShell public", () => {
expect(await axe(container)).toHaveNoViolations();
});

it("shows the sign-in button", () => {
it("shows the sign-in buttons", () => {
const ComposedMobileShell = composeStory(MobileShellPublic, Meta);
render(<ComposedMobileShell />);

const signInButton = screen.getByRole("button", {
// Depending on the viewport size we are showing a sign-in button in
// the top navbar or collapsable menu.
const signInButtons = screen.getAllByRole("button", {
name: "Sign In",
});
expect(signInButton).toBeInTheDocument();
expect(signInButtons.length).toBe(2);
expect(signInButtons[0]).toBeInTheDocument();
expect(signInButtons[1]).toBeInTheDocument();
});

it("opens and closes the menu", async () => {
Expand Down

0 comments on commit 5826f73

Please sign in to comment.