From e2bf2526e23e3e9be0281765b921b474529f8c15 Mon Sep 17 00:00:00 2001 From: Raf Agent Date: Tue, 5 May 2026 19:09:56 +0800 Subject: [PATCH] test: stabilize insights sample bundle loading --- src/pages/InsightsPage.test.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/InsightsPage.test.tsx b/src/pages/InsightsPage.test.tsx index 65721ae..927d0f1 100644 --- a/src/pages/InsightsPage.test.tsx +++ b/src/pages/InsightsPage.test.tsx @@ -115,6 +115,12 @@ describe("InsightsPage", () => { renderPage(); const select = await screen.findByRole("combobox", { name: /load sample bundle/i }); + await waitFor(() => expect(select).toBeEnabled()); + await waitFor(() => + expect( + within(select).getByRole("option", { name: /linked payment \+ status/i }), + ).toBeInTheDocument(), + ); await user.selectOptions(select, "linked"); const threads = await screen.findByLabelText(/lifecycle threads/i); @@ -146,6 +152,10 @@ describe("InsightsPage", () => { const select = (await screen.findByRole("combobox", { name: /load sample bundle/i, })) as HTMLSelectElement; + await waitFor(() => expect(select).toBeEnabled()); + await waitFor(() => + expect(within(select).getByRole("option", { name: /broken bundle/i })).toBeInTheDocument(), + ); await user.selectOptions(select, "broken"); await waitFor(() => {