diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-12-26 13:45:35 +0300 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-12-26 13:45:35 +0300 |
commit | 78dcdc871a053e68e60e72d891801895f74b1c79 (patch) | |
tree | 899b93aef0799d403ca35270a971fc10dbaa2f2d | |
parent | 145079b3540ca832e1d981bbc685cc8c27d47ea0 (diff) | |
parent | 35193d5c05b39de1dbcaf41d567b023038dbb7df (diff) |
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
-rw-r--r-- | qa/qa/page/base.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/issue/show.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index 615d17bbcfe..5788dceaaae 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -80,8 +80,8 @@ module QA page.evaluate_script('xhr.status') == 200 end - def find_element(name, wait: Capybara.default_max_wait_time) - find(element_selector_css(name), wait: wait) + def find_element(name, text_filter = nil, wait: Capybara.default_max_wait_time) + find(element_selector_css(name), wait: wait, text: text_filter) end def all_elements(name) diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb index 23def93c7dd..9ec6d90719e 100644 --- a/qa/qa/page/project/issue/show.rb +++ b/qa/qa/page/project/issue/show.rb @@ -37,17 +37,17 @@ module QA def select_comments_only_filter click_element :discussion_filter - all_elements(:filter_options)[1].click + find_element(:filter_options, "Show comments only").click end def select_history_only_filter click_element :discussion_filter - all_elements(:filter_options).last.click + find_element(:filter_options, "Show history only").click end def select_all_activities_filter click_element :discussion_filter - all_elements(:filter_options).first.click + find_element(:filter_options, "Show all activity").click end end end |