fix: size mobile portal menu controls
This commit is contained in:
1 parent
ec5ed8b22a
commit
9089dce74a
2 files changed
+15
-2
No files matched your search
@@ -39,6 +39,19 @@ test("opens every mobile portal action and marks the most specific active route"
|
|||||||
expect(screen.getByRole("button", { name: /abmelden/i })).toBeTruthy();
|
expect(screen.getByRole("button", { name: /abmelden/i })).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("keeps nested theme and logout buttons at least 44px tall", () => {
|
||||||
|
render(<MobilePortalMenu nav={nav} sectionLabel="Administration" />);
|
||||||
|
|
||||||
|
fireEvent.click(screen.getByRole("button", { name: /menü öffnen/i }));
|
||||||
|
|
||||||
|
const themeToggle = screen.getByRole("button", { name: /design umschalten/i });
|
||||||
|
const logoutButton = screen.getByRole("button", { name: /abmelden/i });
|
||||||
|
|
||||||
|
expect(themeToggle.parentElement?.getAttribute("class")).toContain("[&>button]:min-h-11");
|
||||||
|
expect(themeToggle.parentElement?.getAttribute("class")).toContain("[&>button]:min-w-11");
|
||||||
|
expect(logoutButton.parentElement?.getAttribute("class")).toContain("[&>button]:min-h-11");
|
||||||
|
});
|
||||||
|
|
||||||
test("closes after navigation, Escape and an outside pointer interaction", () => {
|
test("closes after navigation, Escape and an outside pointer interaction", () => {
|
||||||
render(
|
render(
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -90,11 +90,11 @@ export function MobilePortalMenu({ nav, sectionLabel }: Readonly<MobilePortalMen
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
<div className="mt-2 flex min-h-11 items-center justify-between border-t border-border px-3 pt-2">
|
<div className="mt-2 flex min-h-11 items-center justify-between border-t border-border px-3 pt-2 [&>button]:min-h-11 [&>button]:min-w-11">
|
||||||
<span className="text-sm text-muted-foreground">Darstellung</span>
|
<span className="text-sm text-muted-foreground">Darstellung</span>
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 border-t border-border px-3 pt-2">
|
<div className="mt-2 border-t border-border px-3 pt-2 [&>button]:min-h-11">
|
||||||
<LogoutButton />
|
<LogoutButton />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user