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
This commit is contained in:
Mark Lapierre 2019-06-12 23:42:46 +00:00
commit c24e524a33
3 changed files with 4 additions and 5 deletions

View file

@ -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?

View file

@ -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

View file

@ -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")