diff --git a/packages/tui/test/cli/tui/data.test.tsx b/packages/tui/test/cli/tui/data.test.tsx index 444d0bb2ff..53c51d6d14 100644 --- a/packages/tui/test/cli/tui/data.test.tsx +++ b/packages/tui/test/cli/tui/data.test.tsx @@ -764,8 +764,10 @@ test("classifies live tool rows independently of their call ID", async () => { if (url.pathname === `/api/session/${sessionID}/message`) return json({ data: [], cursor: {} }) }, events) let rows!: ReturnType + let client!: ReturnType function Probe() { + client = useClient() rows = createSessionRows(() => sessionID) return } @@ -783,6 +785,7 @@ test("classifies live tool rows independently of their call ID", async () => { )) try { + await wait(() => client.connection.status() === "connected") emitEvent(events, { id: "evt_tool_started", created: 1,