feat(documents): honest handling of undated documents in browse & search (Phase 6, #668) #682

Merged
marcel merged 19 commits from feature/668-undated-documents into docs/import-migration 2026-05-27 21:26:50 +02:00
Showing only changes of commit 995471082e - Show all commits

View File

@@ -154,10 +154,11 @@ describe('DocumentRow', () => {
await expect.element(page.getByTestId('doc-summary')).toBeVisible(); await expect.element(page.getByTestId('doc-summary')).toBeVisible();
}); });
it('renders an em-dash for missing documentDate', async () => { it("renders 'Datum unbekannt' for a missing documentDate", async () => {
render(DocumentRow, { props: { item: baseItem({ documentDate: null }) } }); render(DocumentRow, { props: { item: baseItem({ documentDate: null }) } });
// Multiple em-dashes possible; just ensure at least one is rendered // #668: an undated document renders the "Datum unbekannt" badge (via
expect(document.body.textContent).toContain('—'); // <DocumentDate>), never a bare em-dash.
await expect.element(page.getByText('Datum unbekannt').first()).toBeInTheDocument();
}); });
}); });