feat(geschichte): restore document management for STORY-type Geschichten (#795) #804

Merged
marcel merged 23 commits from feat/issue-795-story-documents into feat/issue-750-lesereisen-data-model 2026-06-11 19:36:37 +02:00
Showing only changes of commit 9ea21f60ea - Show all commits

View File

@@ -4,8 +4,6 @@ import { page, userEvent } from 'vitest/browser';
import { m } from '$lib/paraglide/messages.js';
import StoryDocumentPanel from './StoryDocumentPanel.svelte';
const waitForDebounce = () => new Promise((r) => setTimeout(r, 350));
const docSummary = (id: string, title: string) => ({
id,
title,
@@ -79,7 +77,7 @@ const defaultProps = (overrides: Record<string, unknown> = {}) => ({
async function addViaPicker(title: RegExp) {
await userEvent.fill(page.getByRole('combobox'), 'Brief');
await waitForDebounce();
await expect.element(page.getByText(title)).toBeInTheDocument();
await userEvent.click(page.getByText(title));
}
@@ -160,7 +158,7 @@ describe('StoryDocumentPanel — add', () => {
);
await userEvent.fill(page.getByRole('combobox'), 'Brief');
await waitForDebounce();
await expect.element(page.getByRole('option')).toBeInTheDocument();
const option = document.querySelector('[role="listbox"] [role="option"]');
expect(option?.getAttribute('aria-disabled')).toBe('true');