feat(documents): honest handling of undated documents in browse & search (Phase 6, #668) #682
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user