test(extension): fix startup race in pointer browser test - #51
Merged
Merged
Conversation
…er test Chrome prints "DevTools listening" before it registers the startup tab, so on a slow CI runner /json/list can come back empty and setup fails with "no page target in []". Poll until a page target appears, within the existing 5s step budget, and report the last listing on timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Version Packages PR (#47) failed CI in
pointer.browser.test.tssetup:Chrome prints
DevTools listening on ws://…before it registers the startupabout:blanktab. On a slow runner the singleGET /json/listcan land in that gap and return[]. Nothing in #47 caused it; the release PR just hit the race.Fix: poll
/json/listevery 50ms until a page target shows up, inside the existing 5sstepbudget. On timeout the error includes the last listing.Test plan
vitest run src/lib/pointer.browser.test.ts: 56/56 pass, 3 runs in a row against real Chrome🤖 Generated with Claude Code