Commit 78dcdc87 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-fix-select-activities' into 'master'

Using find_elements instead of all_elements

Closes gitlab-org/quality/staging#18

See merge request gitlab-org/gitlab-ce!23977
parents 145079b3 35193d5c
...@@ -80,8 +80,8 @@ module QA ...@@ -80,8 +80,8 @@ module QA
page.evaluate_script('xhr.status') == 200 page.evaluate_script('xhr.status') == 200
end end
def find_element(name, wait: Capybara.default_max_wait_time) def find_element(name, text_filter = nil, wait: Capybara.default_max_wait_time)
find(element_selector_css(name), wait: wait) find(element_selector_css(name), wait: wait, text: text_filter)
end end
def all_elements(name) def all_elements(name)
......
...@@ -37,17 +37,17 @@ module QA ...@@ -37,17 +37,17 @@ module QA
def select_comments_only_filter def select_comments_only_filter
click_element :discussion_filter click_element :discussion_filter
all_elements(:filter_options)[1].click find_element(:filter_options, "Show comments only").click
end end
def select_history_only_filter def select_history_only_filter
click_element :discussion_filter click_element :discussion_filter
all_elements(:filter_options).last.click find_element(:filter_options, "Show history only").click
end end
def select_all_activities_filter def select_all_activities_filter
click_element :discussion_filter click_element :discussion_filter
all_elements(:filter_options).first.click find_element(:filter_options, "Show all activity").click
end end
end end
end end
......
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