feat(geschichte): wire StoryDocumentPanel into the story editor sidebar (#795)
GeschichteSidebar gains optional geschichteId/items props and renders the panel only when geschichteId is set. GeschichteEditor derives both from its existing GeschichteView prop — null on /geschichten/new, so the panel stays hidden there (create-then-edit, same as journeys). JourneyEditor's sidebar call site is untouched, so journeys never show the panel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { cleanup, render } from 'vitest-browser-svelte';
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
|
||||
vi.mock('$app/navigation', () => ({ beforeNavigate: vi.fn(), goto: vi.fn() }));
|
||||
import StoryCreate from './StoryCreate.svelte';
|
||||
|
||||
afterEach(() => cleanup());
|
||||
|
||||
describe('StoryCreate — document panel guard (#795)', () => {
|
||||
it('renders without the document panel — documents attach after the first save', async () => {
|
||||
render(StoryCreate, { initialPersons: [] });
|
||||
|
||||
expect(document.body.textContent).not.toContain(m.geschichte_documents_heading());
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user