Skip to content

Fix intermittent category select flake in category_scopes_spec for issue#6808

Open
narendrapatel00 wants to merge 1 commit intoWikiEducationFoundation:masterfrom
narendrapatel00:issue-6726-from-upstream
Open

Fix intermittent category select flake in category_scopes_spec for issue#6808
narendrapatel00 wants to merge 1 commit intoWikiEducationFoundation:masterfrom
narendrapatel00:issue-6726-from-upstream

Conversation

@narendrapatel00
Copy link
Copy Markdown

fixes #6726

Fixes an intermittent failure in category_scopes_spec.rb by stabilizing async select interactions for category and template selection.

What changed

  • Added a shared helper choose_select_option(selector, search_text, option_text, exact_text: false) in category_scopes_spec.rb
  • Replaced fragile direct find(:css, ...).click calls with the helper across category/template selection flows
  • Helper waits for the async dropdown option to appear before clicking, reducing timing-related flakiness

Why

The existing spec was vulnerable to race conditions when React/AsyncSelect options were not yet rendered
This change makes the test more reliable without changing application behavior

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.

Category feature spec fails intermittently

1 participant