Commit fa6f8d86 authored by Phil Hughes's avatar Phil Hughes

Fixed multi line comment feature specs

parent 987bb28d
...@@ -129,10 +129,11 @@ RSpec.describe 'User comments on a diff', :js do ...@@ -129,10 +129,11 @@ RSpec.describe 'User comments on a diff', :js do
visit(diffs_project_merge_request_path(project, merge_request, view: 'parallel')) visit(diffs_project_merge_request_path(project, merge_request, view: 'parallel'))
end end
it 'allows comments to start above hidden lines and end below' do # In `files/ruby/popen.rb`
# click +28, select 21 add and verify comment it 'allows comments for changes involving both sides' do
click_diff_line(find('div[data-path="files/ruby/popen.rb"] .new_line a[data-linenumber="28"]').find(:xpath, '../..'), 'right') # click +15, select -13 add and verify comment
add_comment('21', '+28') click_diff_line(find('div[data-path="files/ruby/popen.rb"] .new_line a[data-linenumber="15"]').find(:xpath, '../..'), 'right')
add_comment('-13', '+15')
end 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' do
...@@ -159,7 +160,7 @@ RSpec.describe 'User comments on a diff', :js do ...@@ -159,7 +160,7 @@ RSpec.describe 'User comments on a diff', :js do
all('.js-unfold-down')[1].click all('.js-unfold-down')[1].click
end end
click_diff_line(find('div[data-path="files/ruby/popen.rb"] .old_line a[data-linenumber="30"]').find(:xpath, '../..'), 'left') click_diff_line(find('div[data-path="files/ruby/popen.rb"] .old_line a[data-linenumber="30"]').find(:xpath, '../..'), 'left')
add_comment('-9', '30') add_comment('+28', '37')
end end
end end
......
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