(page: Page, timeout = 15_000)
| 65 | } |
| 66 | |
| 67 | export 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 | |
| 80 | export async function getLastAssistantMessage(page: Page): Promise<string> { |
| 81 | const messages = page.getByTestId('assistant-message') |
no outgoing calls
no test coverage detected