Skip to content

test: make TomSelect helper more robust against focus races - #2730

Merged
mroderick merged 1 commit into
masterfrom
fix/flaky-tom-select-select
Jul 27, 2026
Merged

test: make TomSelect helper more robust against focus races#2730
mroderick merged 1 commit into
masterfrom
fix/flaky-tom-select-select

Conversation

@mroderick

Copy link
Copy Markdown
Collaborator

This PR hardens select_from_tom_select against the flaky failure seen in CI:

expected to find css ".ts-dropdown .option" but there were no matches

The helper now clicks the input explicitly after opening the dropdown, so the search keys are sent to a focused field. This should remove the race where the dropdown was opened but the input had not received focus before typing.

Verification:

  • spec/features/admin/meeting_spec.rb:65 (the failing example) passes with the CI seed 54204 and five additional seeds.
  • All specs that use select_from_tom_select pass locally.

Clicking `.ts-control` does not always focus the input before keys are sent,
which caused the dropdown search to fail intermittently under CI load.
Click the input explicitly after opening the dropdown so `send_keys` is sent
to a focused field.
@mroderick
mroderick marked this pull request as ready for review July 27, 2026 20:17
@mroderick
mroderick merged commit b114e53 into master Jul 27, 2026
10 checks passed
@mroderick
mroderick deleted the fix/flaky-tom-select-select branch July 27, 2026 20:17
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.

1 participant