Document feature spec readiness waits

What does this MR do and why?

Documents reliable readiness and synchronization patterns for feature specs.

  • Replaces the accessibility-guide example that recommends wait_for_requests.
  • Adds canonical guidance on why wait_for_requests and wait_for_all_requests race, and links the RuboCop cop directly to it.
  • Documents concrete replacements from !246008 (merged): waiting matchers, modal readiness, wait_for polling, script reads, shared-example gates, and narrowly scoped JavaScript readiness signals.
  • Clarifies that have_gitlab_http_status accepts a Capybara session.

Resolves #608154

References

How to set up and validate locally

  1. Run bundle exec rspec spec/rubocop/cop/rspec/avoid_wait_for_requests_spec.rb.
  2. Run bundle exec rubocop rubocop/cop/rspec/avoid_wait_for_requests.rb spec/rubocop/cop/rspec/avoid_wait_for_requests_spec.rb.
  3. Run scripts/lint-doc.sh doc/development/fe_guide/accessibility/feature_tests.md doc/development/fe_guide/style/javascript.md doc/development/testing_guide/best_practices.md doc/development/testing_guide/unhealthy_tests.md.
  4. Run lychee --offline --include-fragments doc/development/fe_guide/accessibility/feature_tests.md doc/development/fe_guide/style/javascript.md doc/development/testing_guide/best_practices.md doc/development/testing_guide/unhealthy_tests.md.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pedro Pombeiro

Merge request reports

Loading