diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/features/merge_request/user_comments_on_diff_spec.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/features/merge_request/user_comments_on_diff_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_comments_on_diff_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/features/merge_request/user_comments_on_diff_spec.rb b/spec/features/merge_request/user_comments_on_diff_spec.rb index c452408cff2..0fd140a00bd 100644 --- a/spec/features/merge_request/user_comments_on_diff_spec.rb +++ b/spec/features/merge_request/user_comments_on_diff_spec.rb @@ -31,7 +31,7 @@ RSpec.describe 'User comments on a diff', :js do click_button('Add comment now') end - page.within('.diff-files-holder > div:nth-child(3)') do + page.within('.diff-files-holder > div:nth-child(6)') do expect(page).to have_content('Line is wrong') find('.js-diff-more-actions').click @@ -53,7 +53,7 @@ RSpec.describe 'User comments on a diff', :js do wait_for_requests - page.within('.diff-files-holder > div:nth-child(2) .note-body > .note-text') do + page.within('.diff-files-holder > div:nth-child(5) .note-body > .note-text') do expect(page).to have_content('Line is correct') end @@ -67,7 +67,7 @@ RSpec.describe 'User comments on a diff', :js do wait_for_requests # Hide the comment. - page.within('.diff-files-holder > div:nth-child(3)') do + page.within('.diff-files-holder > div:nth-child(6)') do find('.js-diff-more-actions').click click_button 'Hide comments on this file' @@ -76,22 +76,22 @@ RSpec.describe 'User comments on a diff', :js do # At this moment a user should see only one comment. # The other one should be hidden. - page.within('.diff-files-holder > div:nth-child(2) .note-body > .note-text') do + page.within('.diff-files-holder > div:nth-child(5) .note-body > .note-text') do expect(page).to have_content('Line is correct') end # Show the comment. - page.within('.diff-files-holder > div:nth-child(3)') do + page.within('.diff-files-holder > div:nth-child(6)') do find('.js-diff-more-actions').click click_button 'Show comments on this file' end # Now both the comments should be shown. - page.within('.diff-files-holder > div:nth-child(3) .note-body > .note-text') do + page.within('.diff-files-holder > div:nth-child(6) .note-body > .note-text') do expect(page).to have_content('Line is wrong') end - page.within('.diff-files-holder > div:nth-child(2) .note-body > .note-text') do + page.within('.diff-files-holder > div:nth-child(5) .note-body > .note-text') do expect(page).to have_content('Line is correct') end @@ -102,11 +102,11 @@ RSpec.describe 'User comments on a diff', :js do wait_for_requests - page.within('.diff-files-holder > div:nth-child(3) .parallel .note-body > .note-text') do + page.within('.diff-files-holder > div:nth-child(6) .parallel .note-body > .note-text') do expect(page).to have_content('Line is wrong') end - page.within('.diff-files-holder > div:nth-child(2) .parallel .note-body > .note-text') do + page.within('.diff-files-holder > div:nth-child(5) .parallel .note-body > .note-text') do expect(page).to have_content('Line is correct') end end @@ -136,7 +136,7 @@ RSpec.describe 'User comments on a diff', :js do add_comment('-13', '+15') end - it 'allows comments on previously hidden lines at the top of a file' do + it 'allows comments on previously hidden lines at the top of a file', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/285294' do # Click -9, expand up, select 1 add and verify comment page.within('[data-path="files/ruby/popen.rb"]') do all('.js-unfold-all')[0].click @@ -204,7 +204,7 @@ RSpec.describe 'User comments on a diff', :js do click_button('Add comment now') end - page.within('.diff-file:nth-of-type(5) .discussion .note') do + page.within('.diff-file:nth-of-type(1) .discussion .note') do find('.js-note-edit').click page.within('.current-note-edit-form') do @@ -215,7 +215,7 @@ RSpec.describe 'User comments on a diff', :js do expect(page).not_to have_button('Save comment', disabled: true) end - page.within('.diff-file:nth-of-type(5) .discussion .note') do + page.within('.diff-file:nth-of-type(1) .discussion .note') do expect(page).to have_content('Typo, please fix').and have_no_content('Line is wrong') end end @@ -234,7 +234,7 @@ RSpec.describe 'User comments on a diff', :js do expect(page).to have_content('1') end - page.within('.diff-file:nth-of-type(5) .discussion .note') do + page.within('.diff-file:nth-of-type(1) .discussion .note') do find('.more-actions').click find('.more-actions .dropdown-menu li', match: :first) |