Repository navigation
test(browser): "removing a connected app" no longer fails one run in three - #377
Conversation
…three The test ends on the client's callback page, which `serveClient` serves through DevTools. Chromium then asks for that origin's `/favicon.ico`. Nothing waits for that request, so its `Fetch.fulfillRequest` could still be in flight when the context closed, and its rejection failed the test with `cdpSession.send: Target page, context or browser has been closed`. The served page now declares an icon, so Chromium never makes the request.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The browser test "removing a connected app" in
settings.spec.tsfailed about one run in three withcdpSession.send: Target page, context or browser has been closed, onmainas well as on open PRs.The test ends on the client's callback page, which
serveClientserves through DevTools. After that page loads, Chromium asks forhttps://browser-e2e.test/favicon.ico. Nothing waits for that request, so its fire-and-forgetFetch.fulfillRequestwas sometimes still in flight when the test ended and its context closed. The rejected send then failed the test. Logging every paused request showed each failure was that favicon request, answered just after the context had closed.The page
serveClientserves now declares an icon (<link rel="icon" href="data:,">), so Chromium never makes that request. Every request a client page now makes is one its test waits for. The fix is in the helper, not in a retry or a longer timeout, so it covers every spec that serves a client.Proof, run locally as CI does (Caddy, Mailpit,
just web browser-client, the debug binary):settings.spec.tspassed.serveClientalso passed:oidc,sdk,related-origins,developers,browser-clientandadmin.One unrelated flake came up once along the way, in
admin.spec.ts's recovery test (line 551). That test reloads before the undo it just posted is known to have finished. It passes onmainand with this change, and is left for a separate fix.Reviewed with review-loop: 1 round with 2× GPT 6.1 Sol and Claude Opus 5.5. Verdict: approved
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol and Claude Opus 5.5 (via T3 Code)
🤖 Generated with Claude Code
Browser test helper
serveClientnow includes<link rel="icon" href="data:,">in the blank client page it serves. The page declares an icon, so Chromium does not request/favicon.ico. This prevents an unawaited favicon request from remaining in flight when the test ends.The helper’s documentation now describes the icon and the reason for adding it.