feat(#447): permission-gated reader dashboard #477
@@ -54,7 +54,7 @@ const { persons }: Props = $props();
|
||||
</div>
|
||||
<a
|
||||
href="/persons"
|
||||
class="self-end rounded-sm font-sans text-sm text-brand-navy underline hover:text-brand-mint focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:ring-offset-2 focus-visible:outline-none"
|
||||
class="inline-flex min-h-[44px] items-center self-end rounded-sm font-sans text-sm text-brand-navy underline hover:text-brand-mint focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:ring-offset-2 focus-visible:outline-none"
|
||||
>{m.dashboard_reader_all_persons()}</a
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -66,6 +66,13 @@ describe('ReaderPersonChips', () => {
|
||||
expect(cls).toMatch(/focus-visible:ring-brand-navy/);
|
||||
});
|
||||
|
||||
it('meets the 44px touch target on the "Alle Personen" link', async () => {
|
||||
render(ReaderPersonChips, { persons: [person1] });
|
||||
const allLink = page.getByRole('link', { name: /Alle Personen/i });
|
||||
const cls = ((await allLink.element()) as HTMLElement).className;
|
||||
expect(cls).toMatch(/min-h-\[44px\]/);
|
||||
});
|
||||
|
||||
it('renders empty state without chips when persons array is empty', async () => {
|
||||
render(ReaderPersonChips, { persons: [] });
|
||||
const chips = page.getByRole('link', { name: /Müller|Schmidt/ });
|
||||
|
||||
@@ -48,7 +48,7 @@ function excerpt(body: string | undefined): string {
|
||||
</ul>
|
||||
<a
|
||||
href="/geschichten"
|
||||
class="mt-4 block rounded-sm font-sans text-sm text-brand-navy underline hover:text-brand-mint focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:ring-offset-2 focus-visible:outline-none"
|
||||
class="mt-4 inline-flex min-h-[44px] items-center rounded-sm font-sans text-sm text-brand-navy underline hover:text-brand-mint focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:ring-offset-2 focus-visible:outline-none"
|
||||
>
|
||||
{m.dashboard_reader_all_stories()}
|
||||
</a>
|
||||
|
||||
@@ -65,4 +65,11 @@ describe('ReaderRecentStories', () => {
|
||||
expect(cls).toMatch(/focus-visible:ring-2/);
|
||||
expect(cls).toMatch(/focus-visible:ring-brand-navy/);
|
||||
});
|
||||
|
||||
it('meets the 44px touch target on the "Alle Geschichten" link', async () => {
|
||||
render(ReaderRecentStories, { stories: [story1] });
|
||||
const allLink = page.getByRole('link', { name: /Alle Geschichten/i });
|
||||
const cls = ((await allLink.element()) as HTMLElement).className;
|
||||
expect(cls).toMatch(/min-h-\[44px\]/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user