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
Jérome Perrin
gitlab-ce
Commits
46503b78
Commit
46503b78
authored
Sep 30, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix invalid tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
fe7e9732
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
features/project/merge_requests.feature
features/project/merge_requests.feature
+18
-18
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+18
-18
No files found.
features/project/merge_requests.feature
View file @
46503b78
...
...
@@ -115,40 +115,40 @@ Feature: Project Merge Requests
Given
project
"Shop"
have
"Bug NS-05"
open merge request with diffs inside
And
I visit merge request page
"Bug NS-05"
And
I click on the Changes tab
And
I leave a comment like
"Line is wrong"
on line 39 of the
secon
d file
And
I click link
"Hide inline discussion"
of the
secon
d file
Then
I should not see a comment like
"Line is wrong here"
in the
secon
d file
And
I leave a comment like
"Line is wrong"
on line 39 of the
thir
d file
And
I click link
"Hide inline discussion"
of the
thir
d file
Then
I should not see a comment like
"Line is wrong here"
in the
thir
d file
@javascript
Scenario
:
I
show comments on a merge request diff with comments in a single file
Given
project
"Shop"
have
"Bug NS-05"
open merge request with diffs inside
And
I visit merge request page
"Bug NS-05"
And
I click on the Changes tab
And
I leave a comment like
"Line is wrong"
on line 39 of the
secon
d file
Then
I should see a comment like
"Line is wrong"
in the
secon
d file
And
I leave a comment like
"Line is wrong"
on line 39 of the
thir
d file
Then
I should see a comment like
"Line is wrong"
in the
thir
d file
@javascript
Scenario
:
I
hide comments on a merge request 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 click on the Changes 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
secon
d file
And
I click link
"Hide inline discussion"
of the
secon
d file
Then
I should not see a comment like
"Line is wrong here"
in the
secon
d file
And
I should still see a comment like
"Line is correct"
in the
first
file
And
I leave a comment like
"Line is correct"
on line 12 of the
second
file
And
I leave a comment like
"Line is wrong"
on line 39 of the
thir
d file
And
I click link
"Hide inline discussion"
of the
thir
d file
Then
I should not see a comment like
"Line is wrong here"
in the
thir
d file
And
I should still see a comment like
"Line is correct"
in the
second
file
@javascript
Scenario
:
I
show comments on a merge request 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 click on the Changes 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
secon
d file
And
I click link
"Hide inline discussion"
of the
secon
d file
And
I click link
"Show inline discussion"
of the
secon
d file
Then
I should see a comment like
"Line is wrong"
in the
secon
d file
And
I should still see a comment like
"Line is correct"
in the
first
file
And
I leave a comment like
"Line is correct"
on line 12 of the
second
file
And
I leave a comment like
"Line is wrong"
on line 39 of the
thir
d file
And
I click link
"Hide inline discussion"
of the
thir
d file
And
I click link
"Show inline discussion"
of the
thir
d file
Then
I should see a comment like
"Line is wrong"
in the
thir
d file
And
I should still see a comment like
"Line is correct"
in the
second
file
@javascript
Scenario
:
I
unfold diff
...
...
@@ -163,8 +163,8 @@ Feature: Project Merge Requests
Given
project
"Shop"
have
"Bug NS-05"
open merge request with diffs inside
And
I visit merge request page
"Bug NS-05"
And
I click on the Changes 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
secon
d file
And
I leave a comment like
"Line is correct"
on line 12 of the
second
file
And
I leave a comment like
"Line is wrong"
on line 39 of the
thir
d file
And
I click Side-by-side Diff tab
Then
I should see comments on the side-by-side diff page
...
...
features/steps/project/merge_requests.rb
View file @
46503b78
...
...
@@ -224,43 +224,43 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I click link "Hide inline discussion" of the
secon
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
)'
do
step
'I click link "Hide inline discussion" of the
thir
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
3
)'
do
find
(
'.js-toggle-diff-comments'
).
trigger
(
'click'
)
end
end
step
'I click link "Show inline discussion" of the
secon
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
)'
do
step
'I click link "Show inline discussion" of the
thir
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
3
)'
do
find
(
'.js-toggle-diff-comments'
).
trigger
(
'click'
)
end
end
step
'I should not see a comment like "Line is wrong" in the
secon
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
)'
do
step
'I should not see a comment like "Line is wrong" in the
thir
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
3
)'
do
expect
(
page
).
not_to
have_visible_content
"Line is wrong"
end
end
step
'I should see a comment like "Line is wrong" in the
secon
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
) .note-body > .note-text'
do
step
'I should see a comment like "Line is wrong" in the
thir
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
3
) .note-body > .note-text'
do
expect
(
page
).
to
have_visible_content
"Line is wrong"
end
end
step
'I should not see a comment like "Line is wrong here" in the
secon
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
)'
do
step
'I should not see a comment like "Line is wrong here" in the
thir
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
3
)'
do
expect
(
page
).
not_to
have_visible_content
"Line is wrong here"
end
end
step
'I should see a comment like "Line is wrong here" in the
secon
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
) .note-body > .note-text'
do
step
'I should see a comment like "Line is wrong here" in the
thir
d file'
do
page
.
within
'.files [id^=diff]:nth-child(
3
) .note-body > .note-text'
do
expect
(
page
).
to
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
step
'I leave a comment like "Line is correct" on line 12 of the
second
file'
do
init_diff_note_first_file
page
.
within
(
".js-discussion-note-form"
)
do
...
...
@@ -268,12 +268,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button
"Add Comment"
end
page
.
within
".files [id^=diff]:nth-child(
1
) .note-body > .note-text"
do
page
.
within
".files [id^=diff]:nth-child(
2
) .note-body > .note-text"
do
expect
(
page
).
to
have_content
"Line is correct"
end
end
step
'I leave a comment like "Line is wrong" on line 39 of the
secon
d file'
do
step
'I leave a comment like "Line is wrong" on line 39 of the
thir
d file'
do
init_diff_note_second_file
page
.
within
(
".js-discussion-note-form"
)
do
...
...
@@ -282,8 +282,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I should still see a comment like "Line is correct" in the
first
file'
do
page
.
within
'.files [id^=diff]:nth-child(
1
) .note-body > .note-text'
do
step
'I should still see a comment like "Line is correct" in the
second
file'
do
page
.
within
'.files [id^=diff]:nth-child(
2
) .note-body > .note-text'
do
expect
(
page
).
to
have_visible_content
"Line is correct"
end
end
...
...
@@ -303,7 +303,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I should see comments on the side-by-side diff page'
do
page
.
within
'.files [id^=diff]:nth-child(
1
) .parallel .note-body > .note-text'
do
page
.
within
'.files [id^=diff]:nth-child(
2
) .parallel .note-body > .note-text'
do
expect
(
page
).
to
have_visible_content
"Line is correct"
end
end
...
...
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