Abmelde-Icon neben Hell/Dunkel im App-Kopf
This commit is contained in:
1 parent
fe04693f19
commit
77da7b74bb
1 file changed
+1
-6
@@ -35,23 +35,18 @@ test("switches between work time and vacation settings", () => {
|
||||
expect(screen.queryByRole("heading", { name: "Sollstunden" })).toBeNull();
|
||||
});
|
||||
|
||||
test("zeigt Konto-Tab und Abmelde-Icon nur mit Anmeldung", () => {
|
||||
test("zeigt Konto-Tab nur mit Anmeldung", () => {
|
||||
const { rerender } = render(<SettingsTabs initial={initial} year={2026} />);
|
||||
expect(screen.queryByRole("tab", { name: "Konto" })).toBeNull();
|
||||
expect(screen.queryByRole("button", { name: "Abmelden" })).toBeNull();
|
||||
const onLogout = vi.fn();
|
||||
rerender(
|
||||
<SettingsTabs
|
||||
initial={initial}
|
||||
year={2026}
|
||||
account={{ email: "loki@example.org" }}
|
||||
onLogout={onLogout}
|
||||
/>,
|
||||
);
|
||||
fireEvent.click(screen.getByRole("tab", { name: "Konto" }));
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Benutzerkonto" }),
|
||||
).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole("button", { name: "Abmelden" }));
|
||||
expect(onLogout).toHaveBeenCalled();
|
||||
});
|
||||
Reference in new issue
Block a user