feat(briefwechsel): thumbnail rows with summary quote and bilateral distribution bar (#305) #311

Merged
marcel merged 30 commits from feat/issue-305-briefwechsel-thumbnail-rows into main 2026-04-23 21:38:57 +02:00
Showing only changes of commit 54ef1643a4 - Show all commits

View File

@@ -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,