Commit 508348e2 authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-comment-filter-clean-up' into 'master'

Clean up comment filter e2e spec

See merge request gitlab-org/gitlab!47341
parents 0b78361a 42cfa6a3
...@@ -122,13 +122,17 @@ module QA ...@@ -122,13 +122,17 @@ module QA
def select_all_activities_filter def select_all_activities_filter
select_filter_with_text('Show all activity') select_filter_with_text('Show all activity')
wait_until do
has_no_element?(:discussion_filter_container) && has_element?(:comment_field)
end
end end
def select_comments_only_filter def select_comments_only_filter
select_filter_with_text('Show comments only') select_filter_with_text('Show comments only')
wait_until do wait_until do
has_no_element?(:system_note_content) has_no_element?(:discussion_filter_container) && has_no_element?(:system_note_content)
end end
end end
...@@ -145,6 +149,8 @@ module QA ...@@ -145,6 +149,8 @@ module QA
click_element :note_dropdown click_element :note_dropdown
click_element :discussion_menu_item click_element :discussion_menu_item
click_element :comment_button click_element :comment_button
has_comment?(text)
end end
def toggle_comments(position) def toggle_comments(position)
......
...@@ -4,22 +4,20 @@ module QA ...@@ -4,22 +4,20 @@ module QA
RSpec.describe 'Plan', :reliable do RSpec.describe 'Plan', :reliable do
describe 'collapse comments in issue discussions' do describe 'collapse comments in issue discussions' do
let(:my_first_reply) { 'My first reply' } let(:my_first_reply) { 'My first reply' }
let(:one_reply) { '1 reply' }
let(:issue) { Resource::Issue.fabricate_via_api! }
before do before do
Flow::Login.sign_in Flow::Login.sign_in
Resource::Issue.fabricate_via_api!.visit! issue.visit!
end
it 'collapses and expands reply for comments in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/434' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter show.select_all_activities_filter
show.start_discussion('My first discussion') show.start_discussion('My first discussion')
show.reply_to_discussion(1, my_first_reply) show.reply_to_discussion(1, my_first_reply)
end
end
it 'collapses and expands reply for comments in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/434' do
Page::Project::Issue::Show.perform do |show|
one_reply = "1 reply"
show.collapse_replies show.collapse_replies
expect(show).to have_content(one_reply) expect(show).to have_content(one_reply)
......
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