From fedc6de3737f9e1163d199da819d849acaabe241 Mon Sep 17 00:00:00 2001 From: Ramya Authappan Date: Thu, 8 Nov 2018 05:55:18 +0000 Subject: Fix for the filter spec failure --- qa/qa/page/project/issue/show.rb | 5 +++++ qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb | 1 + .../features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb index de18b9cefa6..23def93c7dd 100644 --- a/qa/qa/page/project/issue/show.rb +++ b/qa/qa/page/project/issue/show.rb @@ -36,6 +36,11 @@ module QA end def select_comments_only_filter + click_element :discussion_filter + all_elements(:filter_options)[1].click + end + + def select_history_only_filter click_element :discussion_filter all_elements(:filter_options).last.click end diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb index f5002c8032f..7145b950b6c 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb @@ -31,6 +31,7 @@ module QA create_issue Page::Project::Issue::Show.perform do |show| + show.select_all_activities_filter show.comment('See attached banana for scale', attachment: file_to_attach) show.refresh diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb index 83603f1cda7..ac34f72bb8f 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb @@ -27,6 +27,11 @@ module QA expect(show_page).to have_content("made the issue confidential") expect(show_page).to have_content("My own comment") + + show_page.select_history_only_filter + + expect(show_page).to have_content("made the issue confidential") + expect(show_page).not_to have_content("My own comment") end end end -- cgit v1.2.1