MCPcopy Index your code
hub / github.com/TanStack/ai / waitForResponse

Function waitForResponse

testing/e2e/tests/helpers.ts:67–78  ·  view source on GitHub ↗
(page: Page, timeout = 15_000)

Source from the content-addressed store, hash-verified

65}
66
67export async function waitForResponse(page: Page, timeout = 15_000) {
68 try {
69 await page
70 .getByTestId('loading-indicator')
71 .waitFor({ state: 'visible', timeout: 5_000 })
72 } catch {
73 // Loading may have already finished
74 }
75 await page
76 .getByTestId('loading-indicator')
77 .waitFor({ state: 'hidden', timeout })
78}
79
80export async function getLastAssistantMessage(page: Page): Promise<string> {
81 const messages = page.getByTestId('assistant-message')

Calls

no outgoing calls

Tested by

no test coverage detected