diff --git a/frontend/src/lib/components/SettingsCard.svelte b/frontend/src/lib/components/SettingsCard.svelte index c09dc8f..f16a95b 100644 --- a/frontend/src/lib/components/SettingsCard.svelte +++ b/frontend/src/lib/components/SettingsCard.svelte @@ -4,17 +4,14 @@ href: string; cta: string; meta?: string; - accent?: boolean; } - let { title, href, cta, meta, accent = false }: Props = $props(); + let { title, href, cta, meta }: Props = $props(); {title} diff --git a/frontend/src/lib/components/SettingsCard.test.ts b/frontend/src/lib/components/SettingsCard.test.ts index 73d53e2..be8fa13 100644 --- a/frontend/src/lib/components/SettingsCard.test.ts +++ b/frontend/src/lib/components/SettingsCard.test.ts @@ -9,9 +9,9 @@ describe('SettingsCard', () => { }); it('renders as an anchor tag with the given href', () => { - render(SettingsCard, { props: { title: 'Vorräte', href: '/household/staples?ctx=settings', cta: 'Bearbeiten →' } }); + render(SettingsCard, { props: { title: 'Vorräte', href: '/household/staples', cta: 'Bearbeiten →' } }); const link = screen.getByRole('link'); - expect(link).toHaveAttribute('href', '/household/staples?ctx=settings'); + expect(link).toHaveAttribute('href', '/household/staples'); }); it('renders the cta text', () => { @@ -29,15 +29,4 @@ describe('SettingsCard', () => { expect(screen.queryByTestId('card-meta')).not.toBeInTheDocument(); }); - it('applies accent border style when accent=true', () => { - render(SettingsCard, { props: { title: 'Vorräte', href: '/household/staples', cta: 'Bearbeiten →', accent: true } }); - const link = screen.getByRole('link'); - expect(link).toHaveAttribute('data-accent', 'true'); - }); - - it('does not apply accent when accent is not set', () => { - render(SettingsCard, { props: { title: 'Haushalt', href: '/members', cta: 'Anzeigen →' } }); - const link = screen.getByRole('link'); - expect(link).not.toHaveAttribute('data-accent', 'true'); - }); });