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 <noreply@anthropic.com>
This commit is contained in:
@@ -244,6 +244,9 @@ async function save(nextStatus: 'DRAFT' | 'PUBLISHED') {
|
||||
onpointerup={() => dragDrop.handlePointerUp()}
|
||||
class="flex flex-col gap-2"
|
||||
>
|
||||
{#if items.length === 0}
|
||||
<p class="font-sans text-sm text-ink-3">{m.journey_empty_state()}</p>
|
||||
{/if}
|
||||
{#each items as item, i (item.id)}
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
|
||||
@@ -55,6 +55,11 @@ describe('JourneyEditor — empty state', () => {
|
||||
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', () => {
|
||||
|
||||
Reference in New Issue
Block a user