diff --git a/frontend/src/routes/briefwechsel/CorrespondenzPersonBar.svelte.test.ts b/frontend/src/routes/briefwechsel/CorrespondenzPersonBar.svelte.test.ts index c7a176ea..02734709 100644 --- a/frontend/src/routes/briefwechsel/CorrespondenzPersonBar.svelte.test.ts +++ b/frontend/src/routes/briefwechsel/CorrespondenzPersonBar.svelte.test.ts @@ -110,10 +110,8 @@ describe('CorrespondenzPersonBar', () => { const corrInput = inputs[inputs.length - 1] as HTMLInputElement; corrInput.dispatchEvent(new Event('focus', { bubbles: true })); - await new Promise((r) => setTimeout(r, 100)); - // No assertion on the suggestions dropdown UI (component-internal), - // just confirm the fetch was made - expect(fetchSpy).toHaveBeenCalled(); + // Confirm the typeahead fired the suggestions fetch. + await vi.waitFor(() => expect(fetchSpy).toHaveBeenCalled()); } finally { fetchSpy.mockRestore(); }