Skip to content

Make the cancelled pairing request test independent of timing - #970

Closed
enaboapps wants to merge 2 commits into
mainfrom
claude/947-pairing-test-timing
Closed

enaboapps wants to merge 2 commits into
mainfrom
claude/947-pairing-test-timing

Conversation

@enaboapps

@enaboapps enaboapps commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #947.

The UI test "clears a cancelled pairing request from the setup guide runtime event" failed once in CI (run 36432010744) with Unable to find role="dialog" and name "Input access" after its one-second wait.

Cause

When the setup guide auto-opens, openSetup() calls perform(api.markSetupShown). In the browser fallback that returns a copy of browserState, which the test never updated, so it still held the pending pairing. If that response settled after the test's cancellation event, syncState restored the pairing, the pairing dialog reappeared and the setup guide was hidden again for the rest of the wait. A longer timeout alone does not fix this.

Change

  • Wait for the auto-open markSetupShown response to settle before emitting the cancellation.
  • Update browserState itself for the cancellation so any later fallback response matches the event.
  • Assert the Input access dialog appears and the pairing stays gone, using the default timeout.

Validation at 6b3c0d8

  • Node 24.13.0.
  • The test passed on three repeated isolated runs.
  • Frontend lint, 253 UI tests, nine script tests and production build passed.
  • Test-only change; Rust is unaffected.

🤖 Generated with Claude Code

The setup guide is revealed in the same render that removes the pairing
dialog, so wait for both in one assertion with a longer timeout instead
of a separate default one-second wait that could expire on slow CI.

Closes #947

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@enaboapps enaboapps added this to the v1.0.0-rc.20 milestone Oct 3, 2026
The flake came from the auto-open markSetupShown response, which still
carried the pending pairing, landing after the cancellation event and
restoring the pairing dialog. Wait for that response first and keep the
fallback state consistent with the cancellation event.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@enaboapps
enaboapps marked this pull request as ready for review October 3, 2026 07:57
@enaboapps enaboapps modified the milestones: v1.0.0-rc.20, v1.0.0-rc.21 Oct 4, 2026
@enaboapps

Copy link
Copy Markdown
Contributor Author

Closing as already incorporated through #972 and shipped in v1.0.0-rc.20. Independent review confirmed that src/App.test.tsx is byte-for-byte identical at this PR head (6b3c0d8), the #972 merge (30e8322), and current main (5d18548), with Git blob 56152c8a146aa88721eb1037d3ad2d880461118f. The targeted cancellation test also passed on current main with Node 24.13.0. No additional merge or code changes are needed; #947 is already closed.

@enaboapps enaboapps closed this Oct 4, 2026
@enaboapps enaboapps modified the milestones: v1.0.0-rc.21, v1.0.0-rc.20 Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the cancelled pairing request test independent of timing

2 participants