test(documents): update obsolete em-dash assertion to undated badge
The "missing documentDate" test asserted the OLD bare em-dash; #668 replaced it with the "Datum unbekannt" badge via <DocumentDate>. Assert the badge text and rename the misleading test title. Refs #668 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -154,10 +154,11 @@ describe('DocumentRow', () => {
|
||||
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 }) } });
|
||||
|
||||
// Multiple em-dashes possible; just ensure at least one is rendered
|
||||
expect(document.body.textContent).toContain('—');
|
||||
// #668: an undated document renders the "Datum unbekannt" badge (via
|
||||
// <DocumentDate>), never a bare em-dash.
|
||||
await expect.element(page.getByText('Datum unbekannt').first()).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user