summaryrefslogtreecommitdiff
path: root/spec/features/projects/merge_requests/user_comments_on_diff_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/merge_requests/user_comments_on_diff_spec.rb')
-rw-r--r--spec/features/projects/merge_requests/user_comments_on_diff_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/features/projects/merge_requests/user_comments_on_diff_spec.rb b/spec/features/projects/merge_requests/user_comments_on_diff_spec.rb
index f34302f25f8..e3f90a78cb5 100644
--- a/spec/features/projects/merge_requests/user_comments_on_diff_spec.rb
+++ b/spec/features/projects/merge_requests/user_comments_on_diff_spec.rb
@@ -31,7 +31,7 @@ describe 'User comments on a diff', :js do
page.within('.files > div:nth-child(3)') do
expect(page).to have_content('Line is wrong')
- find('.js-toggle-diff-comments').trigger('click')
+ find('.js-toggle-diff-comments').click
expect(page).not_to have_content('Line is wrong')
end
@@ -64,7 +64,7 @@ describe 'User comments on a diff', :js do
# Hide the comment.
page.within('.files > div:nth-child(3)') do
- find('.js-toggle-diff-comments').trigger('click')
+ find('.js-toggle-diff-comments').click
expect(page).not_to have_content('Line is wrong')
end
@@ -77,7 +77,7 @@ describe 'User comments on a diff', :js do
# Show the comment.
page.within('.files > div:nth-child(3)') do
- find('.js-toggle-diff-comments').trigger('click')
+ find('.js-toggle-diff-comments').click
end
# Now both the comments should be shown.
@@ -90,6 +90,7 @@ describe 'User comments on a diff', :js do
end
# Check the same comments in the side-by-side view.
+ execute_script("window.scrollTo(0,0);")
click_link('Side-by-side')
wait_for_requests
@@ -153,11 +154,11 @@ describe 'User comments on a diff', :js do
find('.more-actions').click
find('.more-actions .dropdown-menu li', match: :first)
- find('.js-note-delete').click
+ accept_confirm { find('.js-note-delete').click }
end
page.within('.merge-request-tabs') do
- find('.notes-tab').trigger('click')
+ find('.notes-tab').click
end
wait_for_requests