test(korrespondenz): update and expand Vitest component specs

Update empty-state, swap-button, and new-doc-link tests to match redesigned
components. Add new tests for: single-person hint bar visibility, recent-persons
chips from localStorage, corrupt localStorage graceful handling, Row 2
aria-disabled state, and strip letter count in single-person and bilateral modes.

Fix CorrespondenzEmptyState to use {id, name} storage format matching
persistRecentPerson in +page.svelte.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-30 13:04:27 +02:00
parent 4f5f8255a1
commit 1b95d9472b
2 changed files with 116 additions and 42 deletions

View File

@@ -4,8 +4,7 @@ import { conv_empty_search_placeholder, conv_empty_recent_label } from '$lib/mes
interface RecentPerson {
id: string;
firstName: string;
lastName: string;
name: string;
}
interface Props {
@@ -110,9 +109,9 @@ onMount(() => {
class="flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-[#002850] text-[10px] text-white"
aria-hidden="true"
>
{person.firstName[0]}{person.lastName[0]}
{person.name.charAt(0).toUpperCase()}
</span>
<span class="hidden sm:inline">{person.lastName}, </span>{person.firstName}
{person.name}
</button>
{/each}
</div>