( page: Page, workspaceId: string, expectedMarker: string )
| 155 | } |
| 156 | |
| 157 | async function openWorkspace( |
| 158 | page: Page, |
| 159 | workspaceId: string, |
| 160 | expectedMarker: string |
| 161 | ): Promise<void> { |
| 162 | const row = page.locator(`[data-workspace-id="${workspaceId}"][data-workspace-path]`); |
| 163 | await row.waitFor({ state: "visible", timeout: 60_000 }); |
| 164 | await row.scrollIntoViewIfNeeded(); |
| 165 | await row.dispatchEvent("click"); |
| 166 | if (expectedMarker.length > 0) { |
| 167 | await page.waitForFunction( |
| 168 | (marker: string) => document.body.textContent?.includes(marker) ?? false, |
| 169 | expectedMarker, |
| 170 | { timeout: 60_000 } |
| 171 | ); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | async function sendMessage(page: Page, text: string): Promise<void> { |
| 176 | const input = page.getByRole("textbox", { |
no test coverage detected