Skip to content

Stabilize flaky workshops search spec - #2215

Merged
maebeale merged 1 commit into
mainfrom
maebeale/flaky-workshops-dropdown-spec
Aug 16, 2026
Merged

Stabilize flaky workshops search spec#2215
maebeale merged 1 commit into
mainfrom
maebeale/flaky-workshops-dropdown-spec

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 test-only sequencing fix, no app code changed

Closes #2214

What is the goal of this PR and why is this important?

  • spec/system/workshops_spec.rb:22 fails ~1 run in 3 on the Windows-audience dropdown, unrelated to any branch — it gets blamed on whoever's PR hits it next.

How did you approach the change?

  • The filter form auto-submits text inputs on a 400ms debounce but checkboxes immediately, so the query fill and the checkbox check fired two overlapping Turbo-frame reloads; a debounced reload landing mid-assertion left the frame briefly unfiltered.
  • Assert the intermediate filtered state after the text fill (draining the debounce) before opening the dropdown, so the two reloads can't overlap.

Anything else to add?

  • Test-only change. Ran the previously-flaky example 5× and the full file — green each time.

The filter form auto-submits text inputs on a 400ms debounce but checkboxes
immediately, so the query fill and the Windows-audience check triggered two
overlapping Turbo-frame reloads. When the debounced reload landed mid-assertion
the frame was briefly unfiltered, failing ~1 run in 3.

Drain the debounced full-text submit (assert the intermediate filtered state)
before opening the dropdown so the two reloads can't overlap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 15, 2026 23:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale
maebeale marked this pull request as ready for review August 15, 2026 23:49
@maebeale
maebeale merged commit ab9973b into main Aug 16, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/flaky-workshops-dropdown-spec branch August 16, 2026 14:25
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.

Fix: Flaky test ./spec/system/workshops_spec.rb:22

2 participants