Skip to content

Fix intermittently failed click in dropdown in QA

What does this MR do?

Fixes an intermittent failure in which the dropdown toggle button is clicked seemingly before the JS toggle code is bound, so it fails in the next line where we try to click a dropdown item.

Are there points in the code the reviewer needs to double check?

The wait method modification is the same as in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4270, but I assume merging should not be a problem.

Why was this MR needed?

Failures:

  1) GitLab Geo replication users pushes code to the primary node
     Failure/Error:
       project = Factory::Resource::Project.fabricate! do |project|
         project.name = 'geo-project'
         project.description = 'Geo test project'
       end
     
     Capybara::ElementNotFound:
       Unable to find visible css "li[data-value='new-project']" within #<Capybara::Node::Element tag="div" path="/html/body/div[2]/div[2]/div[3]/div/div[2]/div[1]/div/div[2]">
     # ./qa/page/group/show.rb:38:in `block in go_to_new_project'
     # ./qa/page/group/show.rb:36:in `go_to_new_project'
     # ./qa/factory/resource/project.rb:23:in `block in fabricate!'
     # ./qa/scenario/actable.rb:5:in `instance_exec'
     # ./qa/scenario/actable.rb:5:in `act'
     # ./qa/scenario/actable.rb:18:in `act'
     # ./qa/factory/resource/project.rb:23:in `fabricate!'
     # ./qa/factory/base.rb:23:in `block in fabricate!'
     # ./qa/factory/base.rb:16:in `tap'
     # ./qa/factory/base.rb:16:in `fabricate!'
     # ./qa/specs/features/ee/geo/replication_spec.rb:7:in `block (3 levels) in <module:QA>'
     # ./qa/runtime/browser.rb:105:in `perform'
     # ./qa/runtime/browser.rb:27:in `visit'
     # ./qa/runtime/browser.rb:31:in `visit'
     # ./qa/specs/features/ee/geo/replication_spec.rb:4:in `block (2 levels) in <module:QA>'
     # ./qa/specs/runner.rb:22:in `perform'
     # ./qa/scenario/template.rb:7:in `block in perform'
     # ./qa/scenario/template.rb:5:in `tap'
     # ./qa/scenario/template.rb:5:in `perform'
     # ./qa/ee/scenario/test/geo.rb:27:in `perform'
     # ./qa/scenario/template.rb:7:in `block in perform'
     # ./qa/scenario/template.rb:5:in `tap'
     # ./qa/scenario/template.rb:5:in `perform'
     # ./qa/scenario/bootable.rb:26:in `launch!'

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Grzegorz Bizon

Merge request reports