Commit dfc5abb6 authored by Erick Banks's avatar Erick Banks Committed by Mark Lapierre

Allow tests to click elements without page fully loading

parent a1f4569d
...@@ -104,7 +104,8 @@ module QA ...@@ -104,7 +104,8 @@ module QA
end end
def find_element(name, **kwargs) def find_element(name, **kwargs)
wait_for_requests skip_finished_loading_check = kwargs.delete(:skip_finished_loading_check)
wait_for_requests(skip_finished_loading_check: skip_finished_loading_check)
element_selector = element_selector_css(name, reject_capybara_query_keywords(kwargs)) element_selector = element_selector_css(name, reject_capybara_query_keywords(kwargs))
find(element_selector, only_capybara_query_keywords(kwargs)) find(element_selector, only_capybara_query_keywords(kwargs))
...@@ -196,7 +197,8 @@ module QA ...@@ -196,7 +197,8 @@ module QA
# replace with (..., page = self.class) # replace with (..., page = self.class)
def click_element(name, page = nil, **kwargs) def click_element(name, page = nil, **kwargs)
wait_for_requests skip_finished_loading_check = kwargs.delete(:skip_finished_loading_check)
wait_for_requests(skip_finished_loading_check: skip_finished_loading_check)
wait = kwargs.delete(:wait) || Capybara.default_max_wait_time wait = kwargs.delete(:wait) || Capybara.default_max_wait_time
text = kwargs.delete(:text) text = kwargs.delete(:text)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment