diff --git a/frontend/src/lib/geschichte/JourneyEditor.svelte.spec.ts b/frontend/src/lib/geschichte/JourneyEditor.svelte.spec.ts index 7aa12599..496f0358 100644 --- a/frontend/src/lib/geschichte/JourneyEditor.svelte.spec.ts +++ b/frontend/src/lib/geschichte/JourneyEditor.svelte.spec.ts @@ -150,7 +150,7 @@ describe('JourneyEditor — add document', () => { await userEvent.click(page.getByText('Brief hinzufügen')); await userEvent.fill(page.getByRole('combobox'), 'Karl'); await new Promise((r) => setTimeout(r, 350)); // wait debounce - await userEvent.click(page.getByRole('option', { name: /Brief von Karl/ })); + await userEvent.click(page.getByText(/Brief von Karl/)); expect(globalThis.fetch).toHaveBeenCalledWith( expect.stringContaining('/items'), @@ -386,7 +386,10 @@ describe('JourneyEditor — duplicate document aria-disabled', () => { await userEvent.fill(page.getByRole('combobox'), 'Karl'); await new Promise((r) => setTimeout(r, 350)); - const option = page.getByRole('option', { name: /Brief von Karl/ }); - await expect.element(option).toHaveAttribute('aria-disabled', 'true'); + const option = page + .getByText(/Brief von Karl/) + .element() + .closest('li')!; + expect(option.getAttribute('aria-disabled')).toBe('true'); }); });