Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-09-12 22:12:31 +0400
committerMarin Jankovski <marin@gitlab.com>2014-09-12 22:12:31 +0400
commit75fbca83e36100b1e2ab2416c8906d6e5b805231 (patch)
tree06bb961d1e6df8e81b3c27c79226636c937da907 /features
parent9945e8c4244d90a0481846454355e02e80369aa2 (diff)
Add one feature test.
Diffstat (limited to 'features')
-rw-r--r--features/project/merge_requests.feature10
-rw-r--r--features/steps/project/merge_requests.rb10
2 files changed, 20 insertions, 0 deletions
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