diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 8b6c296dfe6..f8dccc15c0e 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -147,3 +147,13 @@ Feature: Project Merge Requests And I switch to the diff tab And I unfold diff Then I should see additional file lines + + @javascript + Scenario: I show comments on a merge request side-by-side diff with comments in multiple files + Given project "Shop" have "Bug NS-05" open merge request with diffs inside + And I visit merge request page "Bug NS-05" + And I switch to the diff tab + And I leave a comment like "Line is correct" on line 12 of the first file + And I leave a comment like "Line is wrong" on line 39 of the second file + And I click Side-by-side Diff tab + Then I should see comments on the side-by-side diff page diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 05d3e5067c5..3ffa3622f4b 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -250,6 +250,16 @@ class ProjectMergeRequests < Spinach::FeatureSteps expect(first('.text-file')).to have_content('.bundle') end + step 'I click Side-by-side Diff tab' do + click_link 'Side-by-side Diff' + end + + step 'I should see comments on the side-by-side diff page' do + within '.files [id^=diff]:nth-child(1) .note-text' do + page.should have_visible_content "Line is correct" + end + end + def project @project ||= Project.find_by!(name: "Shop") end