refactor(timeline): render the WorldBand historical suffix once
The "· historisch" register was emitted in all three date branches, with the dateless branch dropping the leading separator. Render the span pill or date as a conditional prefix, then a single trailing "· historisch" span — one render site, consistent separator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,14 @@ describe('WorldBand', () => {
|
||||
expect(document.body.textContent).toContain(m.timeline_layer_historical_suffix());
|
||||
});
|
||||
|
||||
it('shows "· historisch" with a leading separator even when the band has no date (#833 REQ-009)', () => {
|
||||
render(WorldBand, {
|
||||
entry: historical({ precision: 'UNKNOWN', eventDate: undefined, eventDateEnd: undefined })
|
||||
});
|
||||
expect(document.querySelector('[data-testid="world-range"]')).toBeNull();
|
||||
expect(document.body.textContent).toContain(`· ${m.timeline_layer_historical_suffix()}`);
|
||||
});
|
||||
|
||||
it('follows the RANGE span pill with inline "· historisch" text, not a second pill (#833 REQ-009)', () => {
|
||||
render(WorldBand, { entry: historical() });
|
||||
const pill = document.querySelector('[data-testid="world-range"]');
|
||||
|
||||
Reference in New Issue
Block a user