diff --git a/frontend/src/lib/components/OcrTrainingCard.svelte b/frontend/src/lib/components/OcrTrainingCard.svelte index 28036fba..77a62a94 100644 --- a/frontend/src/lib/components/OcrTrainingCard.svelte +++ b/frontend/src/lib/components/OcrTrainingCard.svelte @@ -82,7 +82,7 @@ async function startTraining() { {successMessage} diff --git a/frontend/src/lib/components/OcrTrainingCard.svelte.spec.ts b/frontend/src/lib/components/OcrTrainingCard.svelte.spec.ts index a81a5227..d1aec9b8 100644 --- a/frontend/src/lib/components/OcrTrainingCard.svelte.spec.ts +++ b/frontend/src/lib/components/OcrTrainingCard.svelte.spec.ts @@ -73,6 +73,24 @@ describe('OcrTrainingCard — enabled state', () => { }); }); +describe('OcrTrainingCard — success dismiss button', () => { + it('dismiss button has 44×44px touch target (h-11 w-11)', async () => { + vi.stubGlobal('fetch', vi.fn().mockResolvedValue({ ok: true })); + + render(OcrTrainingCard, { trainingInfo: baseInfo }); + + const btn = page.getByRole('button', { name: /Training starten/i }); + await btn.click(); + + const dismissBtn = page.getByRole('button', { name: /Schließen/i }); + await expect.element(dismissBtn).toBeInTheDocument(); + + const el = await dismissBtn.element(); + expect(el.classList.contains('h-11')).toBe(true); + expect(el.classList.contains('w-11')).toBe(true); + }); +}); + describe('OcrTrainingCard — in-flight state', () => { it('shows "…" while POST is in-flight', async () => { let resolveFetch!: (v: unknown) => void;