diff options
Diffstat (limited to 'qa/qa/page/base.rb')
-rw-r--r-- | qa/qa/page/base.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index f0d4ae45ef8..abd9332ced0 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -141,6 +141,15 @@ module QA end end + # Use this to simulate moving the pointer to an element's coordinate + # and sending a click event. + # This is a helpful workaround when there is a transparent element overlapping + # the target element and so, normal `click_element` on target would raise + # Selenium::WebDriver::Error::ElementClickInterceptedError + def click_element_coordinates(name) + page.driver.browser.action.move_to(find_element(name).native).click.perform + end + # replace with (..., page = self.class) def click_element(name, page = nil, **kwargs) wait_for_requests @@ -169,7 +178,7 @@ module QA end def has_element?(name, **kwargs) - wait_for_requests + wait_for_requests(skip_finished_loading_check: !!kwargs.delete(:skip_finished_loading_check)) disabled = kwargs.delete(:disabled) @@ -209,15 +218,6 @@ module QA has_text?(text.gsub(/\s+/, " "), wait: wait) end - def finished_loading? - wait_for_requests - - # The number of selectors should be able to be reduced after - # migration to the new spinner is complete. - # https://gitlab.com/groups/gitlab-org/-/epics/956 - has_no_css?('.gl-spinner, .fa-spinner, .spinner', wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME) - end - def finished_loading_block? wait_for_requests |