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 a345bba74b - Show all commits

View File

@@ -44,6 +44,17 @@ describe('ChronikRow', () => {
expect(link).not.toBeNull(); expect(link).not.toBeNull();
}); });
// --- #668 negative guarantee: Chronik never fabricates a letter date ---
it('renders the activity timestamp, not a letter date, and no undated badge', async () => {
// The row shows the relative activity time (happenedAt), never the letter's
// documentDate — ActivityFeedItemDTO carries no date surface to badge.
render(ChronikRow, { item: baseItem });
// No undated badge is introduced into a Chronik row.
expect(document.querySelector('[data-testid="undated-badge"]')).toBeNull();
// No fabricated "Datum unbekannt" letter-date label appears.
await expect.element(page.getByText('Datum unbekannt')).not.toBeInTheDocument();
});
// --- simple variant --- // --- simple variant ---
it('renders simple variant when count === 1 and not a mention', async () => { it('renders simple variant when count === 1 and not a mention', async () => {
render(ChronikRow, { item: baseItem }); render(ChronikRow, { item: baseItem });