MCPcopy
hub / github.com/coder/mux / waitForProjectPage

Function waitForProjectPage

scripts/reproWorkspaceSwitchTearWeb.ts:133–146  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

131}
132
133async 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
148async function ensureProjectExpanded(page: Page): Promise<void> {
149 const projectRow = page.locator("[data-project-path]").first();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected