Fix flaky features/protected_tags_spec
What does this MR do and why?
Related to #500627 (closed)
This fixes a number of issues with a flaky features/protected_tags_spec spec.
- Wait for dropdowns to become enabled/visible before finding elements within them
- Wait for
page.allto find the expected number of elements before returning - More explicitly select elements
In case this doesn't resolve all of the issues with this spec, and someone comes back to this MR for context, here's a summary of my debugging and investigation: #500627 (comment 2254394276)
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
- Checkout this branch
-
Run bundle exec rspec --color spec/features/protected_tags_spec.rbas many times as you have time for without failures.
Numbered steps to set up and validate the change are strongly suggested.