feat(briefwechsel): thumbnail rows with summary quote and bilateral distribution bar (#305) #311
@@ -104,6 +104,20 @@ describe('ThumbnailRow', () => {
|
||||
expect(document.body.textContent).toContain('vor 76 Jahren');
|
||||
});
|
||||
|
||||
it('hides the relative-year label when documentDate is in the future', () => {
|
||||
// relativeYearsDe returns "" for future/invalid dates; the row must not
|
||||
// then render an empty chip or print "vor 0 Jahren".
|
||||
render(ThumbnailRow, {
|
||||
doc: { ...baseDoc, documentDate: '2030-01-01' },
|
||||
isOut: true,
|
||||
showOtherParty: false,
|
||||
now: new Date('2026-06-01T00:00:00Z')
|
||||
});
|
||||
|
||||
expect(document.body.textContent).not.toMatch(/vor \d+ Jahr/);
|
||||
expect(document.body.textContent).not.toMatch(/vor weniger/);
|
||||
});
|
||||
|
||||
it('sets border-l class based on isOut', () => {
|
||||
const { unmount } = render(ThumbnailRow, {
|
||||
doc: baseDoc,
|
||||
|
||||
Reference in New Issue
Block a user