Skip to content

Test: wait for permissions dropdown to be enabled

Jay McCure requested to merge jmc-425080 into master

What does this MR do and why?

Resolves #425080 (closed)

Sometimes the permissions dropdown list for protected branches is greyed out until it is loaded. Selenium will happily click the dropdown list even when it is disabled and not fail. This leaves the test in a state where the dropdown list is not open when it should be. This is causing errors when trying to click on dropdown list items, such as:

Capybara::ElementNotFound:
       Unable to find css ".dropdown .dropdown-menu.show" within #<Capybara::Node::Element tag="div" path="/HTML/BODY[1]/DIV[3]/DIV[1]/DIV[3]/MAIN[1]/SECTION[6]/DIV[2]/DIV[1]/DIV[2]/DIV[2]">

If we add :not([disabled]) to the selector, selenium will not find the element until it is not disabled.

This will allow us to de-quarantine a test. Even with this test quarantined, there are other tests that are failing which is causing master-brokenflaky-test and release-blocker incidents.

e.g.

How to set up and validate locally

rspec ee/spec/features/protected_tags_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jay McCure

Merge request reports