diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/support/shared_examples/features/discussion_comments_shared_example.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/support/shared_examples/features/discussion_comments_shared_example.rb')
-rw-r--r-- | spec/support/shared_examples/features/discussion_comments_shared_example.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/shared_examples/features/discussion_comments_shared_example.rb b/spec/support/shared_examples/features/discussion_comments_shared_example.rb index fb2e422559d..318ba67b9e9 100644 --- a/spec/support/shared_examples/features/discussion_comments_shared_example.rb +++ b/spec/support/shared_examples/features/discussion_comments_shared_example.rb @@ -7,7 +7,7 @@ RSpec.shared_examples 'thread comments for commit and snippet' do |resource_name let(:menu_selector) { "#{dropdown_selector} .dropdown-menu" } let(:submit_selector) { "#{form_selector} .js-comment-submit-button" } let(:close_selector) { "#{form_selector} .btn-comment-and-close" } - let(:comments_selector) { '.timeline > .note.timeline-entry' } + let(:comments_selector) { '.timeline > .note.timeline-entry:not(.being-posted)' } let(:comment) { 'My comment' } it 'clicking "Comment" will post a comment' do @@ -187,7 +187,7 @@ RSpec.shared_examples 'thread comments for issue, epic and merge request' do |re let(:toggle_selector) { "#{dropdown_selector} .dropdown-toggle-split" } let(:menu_selector) { "#{dropdown_selector} .dropdown-menu" } let(:close_selector) { "#{form_selector} .btn-comment-and-close" } - let(:comments_selector) { '.timeline > .note.timeline-entry' } + let(:comments_selector) { '.timeline > .note.timeline-entry:not(.being-posted)' } let(:comment) { 'My comment' } it 'clicking "Comment" will post a comment' do @@ -197,6 +197,8 @@ RSpec.shared_examples 'thread comments for issue, epic and merge request' do |re find(submit_button_selector).click + wait_for_all_requests + expect(page).to have_content(comment) new_comment = all(comments_selector).last |