Skip to content

Fix tests failing in headed mode

Erick Banks requested to merge ISSUE35690 into master

What does this MR do?

This MR fixes the set of tests that run in qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb when running with CHROME_HEADLESS=false mode. Previously the dropdown menus would fail to close and obscure UI elements that the test needed to click on, and would thus fail to locate them and the test would fail. By changing the element we click on this now closes the dropdown menu revealing the next UI element that can now be clicked on.

Also adds exit_on_failure to the qa/qa/resource/base.rb:visit! method so that if we fail to navigate to a page we'll exit on navigation failure rather than on failing to find an expected UI element. The commit I authored to change the way we use visit was superseded by Sanad's commit that uses Support::WaitForRequests.wait_for_requests

Does this MR meet the acceptance criteria?

Conformity

Edited by Dan Davison

Merge request reports