| 131 | } |
| 132 | |
| 133 | async function waitForProjectPage(page: Page): Promise<void> { |
| 134 | await page.waitForFunction(() => Boolean(window.__ORPC_CLIENT__), { timeout: 60_000 }); |
| 135 | await page.waitForSelector("[data-project-path]", { timeout: 60_000 }); |
| 136 | |
| 137 | // Browser dev-server boots onto the project page with a first-launch provider walkthrough. |
| 138 | // Close it so workspace-row clicks are not intercepted during the repro. |
| 139 | for (const label of ["Close", "Skip"] as const) { |
| 140 | const button = page.getByRole("button", { name: label }).last(); |
| 141 | if (await button.isVisible().catch(() => false)) { |
| 142 | await button.click(); |
| 143 | break; |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | async function ensureProjectExpanded(page: Page): Promise<void> { |
| 149 | const projectRow = page.locator("[data-project-path]").first(); |