Commit f2cded4d authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-nightly-107-fix-comment-on-issue' into 'master'

Comment will select all activities filter by default

Closes gitlab-org/quality/nightly#107

See merge request gitlab-org/gitlab-ee!14063
parents 52107827 feb671a2
......@@ -30,7 +30,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?
......
......@@ -51,7 +51,6 @@ module QA
Page::Project::Issue::Show.perform do |show_page|
show_page.wait_for_related_issues_to_load
show_page.select_all_activities_filter
show_page.comment("/epic #{epic.web_url}")
show_page.comment("/remove_epic")
expect(show_page).to have_content('removed from epic')
......
......@@ -24,10 +24,6 @@ module QA
end
Page::Project::Issue::Show.perform do |show|
# Due to the randomness of tests execution, sometimes a previous test
# may have changed the filter, which makes the below action needed.
# TODO: Make this test completely independent, not requiring the below step.
show.select_all_activities_filter
show.comment('/promote')
expect(show).to have_content("promoted to epic")
......
......@@ -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
......
......@@ -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")
......
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