test(tui): wait for connection before tool event (#36958)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
d88faeb6da
commit
fca3bca19d
1 changed files with 3 additions and 0 deletions
|
|
@ -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: {} })
|
if (url.pathname === `/api/session/${sessionID}/message`) return json({ data: [], cursor: {} })
|
||||||
}, events)
|
}, events)
|
||||||
let rows!: ReturnType<typeof createSessionRows>
|
let rows!: ReturnType<typeof createSessionRows>
|
||||||
|
let client!: ReturnType<typeof useClient>
|
||||||
|
|
||||||
function Probe() {
|
function Probe() {
|
||||||
|
client = useClient()
|
||||||
rows = createSessionRows(() => sessionID)
|
rows = createSessionRows(() => sessionID)
|
||||||
return <box />
|
return <box />
|
||||||
}
|
}
|
||||||
|
|
@ -783,6 +785,7 @@ test("classifies live tool rows independently of their call ID", async () => {
|
||||||
))
|
))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
await wait(() => client.connection.status() === "connected")
|
||||||
emitEvent(events, {
|
emitEvent(events, {
|
||||||
id: "evt_tool_started",
|
id: "evt_tool_started",
|
||||||
created: 1,
|
created: 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue