From 573e5c43d7531c6cc3ae7a3a75095d88cdd278e8 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 9 Jun 2026 14:44:07 +0200 Subject: [PATCH] fix(journey-editor): render empty-state message when items list is empty Previously the item list area was blank when no items had been added. The empty-state paragraph uses the existing journey_empty_state i18n key. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/lib/geschichte/JourneyEditor.svelte | 3 +++ frontend/src/lib/geschichte/JourneyEditor.svelte.spec.ts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/frontend/src/lib/geschichte/JourneyEditor.svelte b/frontend/src/lib/geschichte/JourneyEditor.svelte index b77d245e..458520b4 100644 --- a/frontend/src/lib/geschichte/JourneyEditor.svelte +++ b/frontend/src/lib/geschichte/JourneyEditor.svelte @@ -244,6 +244,9 @@ async function save(nextStatus: 'DRAFT' | 'PUBLISHED') { onpointerup={() => dragDrop.handlePointerUp()} class="flex flex-col gap-2" > + {#if items.length === 0} +

{m.journey_empty_state()}

+ {/if} {#each items as item, i (item.id)}
{ render(JourneyEditor, defaultProps()); await expect.element(page.getByRole('button', { name: /Veröffentlichen/ })).toBeDisabled(); }); + + it('shows empty state message when items list is empty', async () => { + render(JourneyEditor, defaultProps()); + await expect.element(page.getByText('Diese Lesereise ist noch leer.')).toBeInTheDocument(); + }); }); describe('JourneyEditor — items in position order', () => {