summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-10-06 15:07:48 +0200
committerMarin Jankovski <maxlazio@gmail.com>2014-10-06 16:09:22 +0200
commit9535ce2caa7122e3f1be8932660c3d53e0457bbc (patch)
tree2b9290441cce7c97a3e2d2a17840006bf2839207 /features
parent270efdf221c1ae52408c5a05e9592cb18f3d10df (diff)
downloadgitlab-ce-9535ce2caa7122e3f1be8932660c3d53e0457bbc.tar.gz
Preventing some duplication in MR feature tests by adding a different comment.
Diffstat (limited to 'features')
-rw-r--r--features/project/merge_requests.feature6
-rw-r--r--features/steps/project/merge_requests.rb18
2 files changed, 15 insertions, 9 deletions
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature
index f8dccc15c0e..60302c44ddb 100644
--- a/features/project/merge_requests.feature
+++ b/features/project/merge_requests.feature
@@ -105,7 +105,7 @@ Feature: Project Merge Requests
And I switch to the diff tab
And I leave a comment like "Line is wrong" on line 39 of the second file
And I click link "Hide inline discussion" of the second file
- Then I should not see a comment like "Line is wrong" in the second file
+ Then I should not see a comment like "Line is wrong here" in the second file
@javascript
Scenario: I show comments on a merge request diff with comments in a single file
@@ -113,8 +113,6 @@ Feature: Project Merge Requests
And I visit merge request page "Bug NS-05"
And I switch to the diff tab
And I leave a comment like "Line is wrong" on line 39 of the second file
- And I click link "Hide inline discussion" of the second file
- And I click link "Show inline discussion" of the second file
Then I should see a comment like "Line is wrong" in the second file
@javascript
@@ -125,7 +123,7 @@ Feature: Project Merge Requests
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 link "Hide inline discussion" of the second file
- Then I should not see a comment like "Line is wrong" in the second file
+ Then I should not see a comment like "Line is wrong here" in the second file
And I should still see a comment like "Line is correct" in the first file
@javascript
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index c101c696253..fba03c2fc64 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -211,6 +211,18 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
+ step 'I should not see a comment like "Line is wrong here" in the second file' do
+ within '.files [id^=diff]:nth-child(2)' do
+ page.should_not have_visible_content "Line is wrong here"
+ end
+ end
+
+ step 'I should see a comment like "Line is wrong here" in the second file' do
+ within '.files [id^=diff]:nth-child(2) .note-text' do
+ page.should have_visible_content "Line is wrong here"
+ end
+ end
+
step 'I leave a comment like "Line is correct" on line 12 of the first file' do
init_diff_note_first_file
@@ -228,13 +240,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
init_diff_note_second_file
within(".js-discussion-note-form") do
- fill_in "note_note", with: "Line is wrong"
+ fill_in "note_note", with: "Line is wrong on here"
click_button "Add Comment"
end
-
- within ".files [id^=diff]:nth-child(2) .note-text" do
- page.should have_content "Line is wrong"
- end
end
step 'I should still see a comment like "Line is correct" in the first file' do