summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-06-12 23:42:46 +0000
committerMark Lapierre <mlapierre@gitlab.com>2019-06-12 23:42:46 +0000
commitc24e524a33fd3ab03cb26e795e25673cd3e0bd96 (patch)
tree278559d974c69a9d251b9fd5e181295e058e2c7e /qa
parentb05de5a583e35931967dcc70d2f26f568c9cf0db (diff)
parenta154d9db2018e8034e3c0d25c34502aabf3701c0 (diff)
downloadgitlab-ce-c24e524a33fd3ab03cb26e795e25673cd3e0bd96.tar.gz
Merge branch 'qa-nightly-107-fix-comment-on-issue-ce' into 'master'
CE port of "Comment will select all activites filter by default" See merge request gitlab-org/gitlab-ce!29496
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/issue/show.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb1
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb5
3 files changed, 4 insertions, 5 deletions
diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb
index 9df3db1bba0..77bad7481d8 100644
--- a/qa/qa/page/project/issue/show.rb
+++ b/qa/qa/page/project/issue/show.rb
@@ -29,7 +29,8 @@ module QA
# Adds a comment to an issue
# attachment option should be an absolute path
- def comment(text, attachment: nil)
+ def comment(text, attachment: nil, filter: :all_activities)
+ method("select_#{filter}_filter").call
fill_element :comment_input, text
unless attachment.nil?
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 9b083d59a5e..00094161f61 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
@@ -23,7 +23,6 @@ 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 c0d597af076..b2164bb5fab 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
@@ -16,9 +16,8 @@ module QA
expect(page).to have_content(issue_title)
Page::Project::Issue::Show.perform do |show_page|
- show_page.select_comments_only_filter
- show_page.comment('/confidential')
- show_page.comment('My own comment')
+ show_page.comment('/confidential', filter: :comments_only)
+ show_page.comment('My own comment', filter: :comments_only)
expect(show_page).not_to have_content("made the issue confidential")
expect(show_page).to have_content("My own comment")