Skip to content

Test: wait for permissions dropdown to not be disabled

Jay McCure requested to merge jmc-inc-3796 into master

What does this MR do and why?

Resolves gitlab-org/quality/engineering-productivity/master-broken-incidents#3796 (closed)

This is a follow-on from !133557 (merged), it turns out I missed some selectors, so some of the tests can still fail.

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.

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