Files
coder/site/e2e/tests
Jeremy Ruppel 4b755e514a fix(site): stabilize app.spec.ts e2e test (#24400)
The `app` e2e test flakes in CI with `waitForEvent("page")` or
`isVisible()` timeouts when opening a workspace app in a new tab.

The test had several timing hazards: the HTTP server address was read
before the socket finished binding, the popup event listener was
registered after the click, and content visibility used a point-in-time
check with the default 5s timeout.

Rewritten to wait for the server to listen, register the popup promise
before clicking, use `getByRole("link")` for a precise locator, and
replace `isVisible()` with a retrying `toBeVisible({ timeout: 30_000 })`
assertion that tolerates the intermediate `about:blank` page and
app-proxy startup delay. The test body is wrapped in `try/finally` to
ensure the HTTP server is always closed.

Fixes coder/internal#577

> Generated by Coder Agents

---

someone wise once said

> and I really don't know what we could do to make it more reliable
other than maybe trying to just rewrite it from scratch.
2026-04-20 10:21:36 -04:00
..