diff --git a/ApiCore-Frontend/src/app/(app)/voice/page.spec.tsx b/ApiCore-Frontend/src/app/(app)/voice/page.spec.tsx index 829ffd7..ce4fbd0 100644 --- a/ApiCore-Frontend/src/app/(app)/voice/page.spec.tsx +++ b/ApiCore-Frontend/src/app/(app)/voice/page.spec.tsx @@ -155,7 +155,9 @@ describe("VoiceListPage", () => { }); renderPage(); - const items = await screen.findAllByRole("listitem"); + // The device list comes from IndexedDB and may arrive after the server list. + await screen.findByText("Wartet auf Netz"); + const items = screen.getAllByRole("listitem"); expect(within(items[0]).getByText("B4")).toBeInTheDocument(); expect(within(items[0]).getByText("Wartet auf Netz")).toBeInTheDocument(); expect(within(items[1]).getByText("B9")).toBeInTheDocument();