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 ...@@ -29,7 +29,8 @@ module QA
# Adds a comment to an issue # Adds a comment to an issue
# attachment option should be an absolute path # 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 fill_element :comment_input, text
unless attachment.nil? unless attachment.nil?
......
...@@ -23,7 +23,6 @@ module QA ...@@ -23,7 +23,6 @@ module QA
create_issue create_issue
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
show.comment('See attached banana for scale', attachment: file_to_attach) show.comment('See attached banana for scale', attachment: file_to_attach)
show.refresh show.refresh
......
...@@ -16,9 +16,8 @@ module QA ...@@ -16,9 +16,8 @@ module QA
expect(page).to have_content(issue_title) expect(page).to have_content(issue_title)
Page::Project::Issue::Show.perform do |show_page| Page::Project::Issue::Show.perform do |show_page|
show_page.select_comments_only_filter show_page.comment('/confidential', filter: :comments_only)
show_page.comment('/confidential') show_page.comment('My own comment', filter: :comments_only)
show_page.comment('My own comment')
expect(show_page).not_to have_content("made the issue confidential") expect(show_page).not_to have_content("made the issue confidential")
expect(show_page).to have_content("My own comment") 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