Commit a154d9db authored by Sanad Liaquat's avatar Sanad Liaquat

Comment will select all activites filter by default

parent 3efd59b9
......@@ -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?
......
......@@ -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