Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
9535ce2c
Commit
9535ce2c
authored
Oct 06, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preventing some duplication in MR feature tests by adding a different comment.
parent
270efdf2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
features/project/merge_requests.feature
features/project/merge_requests.feature
+2
-4
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+13
-5
No files found.
features/project/merge_requests.feature
View file @
9535ce2c
...
...
@@ -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
...
...
features/steps/project/merge_requests.rb
View file @
9535ce2c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment