fix(journey): person chips rendered blank — share one PersonView→PersonOption projection
JourneyEditor fed GeschichteView.PersonView (no displayName) straight into the displayName-rendering PersonMultiSelect, so every chip on a journey was empty. The name mapping both editors need now lives once in $lib/person/personOption.ts (with the [Unbekannt] fallback matching GeschichteService.toView), and PersonMultiSelect/GeschichteSidebar import the narrow PersonOption contract from there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -394,3 +394,18 @@ describe('JourneyEditor — duplicate document aria-disabled', () => {
|
||||
expect(option.getAttribute('aria-disabled')).toBe('true');
|
||||
});
|
||||
});
|
||||
|
||||
describe('JourneyEditor — person chips from GeschichteView', () => {
|
||||
it('renders person names in the sidebar chips (PersonView carries no displayName)', async () => {
|
||||
render(
|
||||
JourneyEditor,
|
||||
defaultProps({
|
||||
geschichte: makeGeschichte({
|
||||
persons: [{ id: 'p1', firstName: 'Anna', lastName: 'Schmidt' }]
|
||||
})
|
||||
})
|
||||
);
|
||||
|
||||
await expect.element(page.getByText('Anna Schmidt')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user