feat(settings): implement /settings hub page (E1) — Kachel-Ansicht #55
@@ -31,7 +31,7 @@ describe('AppShell', () => {
|
||||
it('renders all navigation links from all nav variants', () => {
|
||||
render(AppShell, { props: defaultProps });
|
||||
const links = screen.getAllByRole('link');
|
||||
// Mobile: 4, Tablet: 4, Desktop: 5 = 13 total
|
||||
expect(links).toHaveLength(13);
|
||||
// Mobile: 4, Tablet: 4, Desktop: 4 = 12 total
|
||||
expect(links).toHaveLength(12);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -28,17 +28,17 @@ describe('DesktopSidebar', () => {
|
||||
expect(screen.getByText('Einkauf')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders Household section with 2 items', () => {
|
||||
it('renders Household section with Einstellungen', () => {
|
||||
render(DesktopSidebar, { props: { appName: 'Mealprep', householdName: 'Familie Müller' } });
|
||||
expect(screen.getByText('Haushalt')).toBeInTheDocument();
|
||||
expect(screen.getByText('Mitglieder')).toBeInTheDocument();
|
||||
expect(screen.getByText('Einstellungen')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Mitglieder')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('has 5 navigation links total', () => {
|
||||
it('has 4 navigation links total', () => {
|
||||
render(DesktopSidebar, { props: { appName: 'Mealprep', householdName: 'Familie Müller' } });
|
||||
const links = screen.getAllByRole('link');
|
||||
expect(links).toHaveLength(5);
|
||||
expect(links).toHaveLength(4);
|
||||
});
|
||||
|
||||
it('marks active item with aria-current="page"', () => {
|
||||
|
||||
@@ -34,9 +34,9 @@ describe('nav config', () => {
|
||||
expect(labels).toEqual(['Planer', 'Rezepte', 'Einkauf']);
|
||||
});
|
||||
|
||||
it('Household section has Members, Settings', () => {
|
||||
it('Household section has Settings', () => {
|
||||
const labels = desktopNavSections[1].items.map((item) => item.label);
|
||||
expect(labels).toEqual(['Mitglieder', 'Einstellungen']);
|
||||
expect(labels).toEqual(['Einstellungen']);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ export const desktopNavSections: NavSection[] = [
|
||||
{
|
||||
title: 'Haushalt',
|
||||
items: [
|
||||
{ href: '/members', label: 'Mitglieder', icon: '👥' },
|
||||
{ href: '/settings', label: 'Einstellungen', icon: '⚙️', extraPaths: ['/household/staples'] }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user