From a345bba74be301a2adc61b8cc913c0ed3e79bcc9 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 27 May 2026 18:54:35 +0200 Subject: [PATCH] test(activity): assert Chronik rows never fabricate a letter date Negative guarantee for #668: ChronikRow renders the activity timestamp (happenedAt), and ActivityFeedItemDTO carries no document-date surface, so no undated badge or "Datum unbekannt" letter-date label may appear. Pins this as a regression fixture so a future change can't quietly add a date chip to the activity feed. Refs #668 --- frontend/src/lib/activity/ChronikRow.svelte.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/lib/activity/ChronikRow.svelte.spec.ts b/frontend/src/lib/activity/ChronikRow.svelte.spec.ts index 0afccf9c..c97d8957 100644 --- a/frontend/src/lib/activity/ChronikRow.svelte.spec.ts +++ b/frontend/src/lib/activity/ChronikRow.svelte.spec.ts @@ -44,6 +44,17 @@ describe('ChronikRow', () => { 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 --- it('renders simple variant when count === 1 and not a mention', async () => { render(ChronikRow, { item: baseItem });