diff --git a/frontend/src/lib/person/PersonLifeDateField.svelte b/frontend/src/lib/person/PersonLifeDateField.svelte index 53a8e04f..0d56f36a 100644 --- a/frontend/src/lib/person/PersonLifeDateField.svelte +++ b/frontend/src/lib/person/PersonLifeDateField.svelte @@ -1,7 +1,7 @@ { const select = (await page.getByLabelText(/^generation$/i).element()) as HTMLSelectElement; expect(select.value).toBe(''); }); + + // ─── partial-date guard (#812 review) ──────────────────────────────────────── + + it('blocks submission while a stored birth date is partially edited (no silent clear)', async () => { + render(PersonEditForm, { props: { person: personPersonal } }); + + await userEvent.fill(page.getByLabelText(/^geburtsdatum$/i), '14.03.'); + + const birthInput = (await page.getByLabelText(/^geburtsdatum$/i).element()) as HTMLInputElement; + expect(birthInput.checkValidity()).toBe(false); + await expect.element(page.getByText(/Bitte im Format TT\.MM\.JJJJ/)).toBeVisible(); + }); });