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

Function waitForAssistantText

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

Source from the content-addressed store, hash-verified

87/** Wait for an assistant message containing specific text (useful for tool-calling where
88 * the agentic loop produces multiple responses and waitForResponse returns too early) */
89export async function waitForAssistantText(
90 page: Page,
91 text: string,
92 timeout = 15_000,
93) {
94 await page
95 .getByTestId('assistant-message')
96 .filter({ hasText: text })
97 .first()
98 .waitFor({ state: 'visible', timeout })
99}
100
101export async function getToolCalls(
102 page: Page,

Calls

no outgoing calls

Tested by

no test coverage detected