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
e14d517b
Commit
e14d517b
authored
Jun 25, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge request diff features
parent
d2b5c3f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
23 deletions
+16
-23
features/project/merge_requests.feature
features/project/merge_requests.feature
+8
-8
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+6
-12
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+2
-3
No files found.
features/project/merge_requests.feature
View file @
e14d517b
...
...
@@ -63,7 +63,7 @@ Feature: Project Merge Requests
Scenario
:
I
comment on a merge request diff
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
click on the Changes
tab
And
I leave a comment like
"Line is wrong"
on diff
And
I switch to the merge request's comments tab
Then
I should see a discussion has started on diff
...
...
@@ -114,7 +114,7 @@ Feature: Project Merge Requests
Scenario
:
I
hide 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
switch to the diff
tab
And
I
click on the Changes
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 here"
in the second file
...
...
@@ -123,7 +123,7 @@ Feature: Project Merge Requests
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
switch to the diff
tab
And
I
click on the Changes
tab
And
I leave a comment like
"Line is wrong"
on line 39 of the second file
Then
I should see a comment like
"Line is wrong"
in the second file
...
...
@@ -131,7 +131,7 @@ Feature: Project Merge Requests
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
switch to the diff
tab
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 second file
And
I click link
"Hide inline discussion"
of the second file
...
...
@@ -142,7 +142,7 @@ Feature: Project Merge Requests
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
switch to the diff
tab
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 second file
And
I click link
"Hide inline discussion"
of the second file
...
...
@@ -154,7 +154,7 @@ Feature: Project Merge Requests
Scenario
:
I
unfold diff
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
click on the Changes
tab
And
I unfold diff
Then
I should see additional file lines
...
...
@@ -162,7 +162,7 @@ Feature: Project Merge Requests
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
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 second file
And
I click Side-by-side Diff tab
...
...
@@ -172,7 +172,7 @@ Feature: Project Merge Requests
Scenario
:
I
view diffs on a merge request
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
via Javascript
And
I click on the Changes tab
Then
I should see the proper Inline and Side-by-side links
# Description preview
...
...
features/steps/project/merge_requests.rb
View file @
e14d517b
...
...
@@ -118,25 +118,17 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
author:
project
.
users
.
first
)
end
step
'I switch to the diff tab'
do
visit
diffs_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
end
step
'I click on the Changes tab via Javascript'
do
step
'I click on the Changes tab'
do
page
.
within
'.merge-request-tabs'
do
click_link
'Changes'
end
sleep
2
# Waits for load
expect
(
page
).
to
have_css
(
'.tab-content #diffs.active'
)
end
step
'I should see the proper Inline and Side-by-side links'
do
buttons
=
page
.
all
(
'#commit-diff-viewtype'
)
expect
(
buttons
.
count
).
to
eq
(
2
)
buttons
.
each
do
|
b
|
expect
(
b
[
'href'
]).
not_to
have_content
(
'json'
)
end
expect
(
page
).
to
have_css
(
'#commit-diff-viewtype'
,
count:
2
)
end
step
'I switch to the merge request\'s comments tab'
do
...
...
@@ -301,6 +293,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I unfold diff'
do
expect
(
page
).
to
have_css
(
'.js-unfold'
)
first
(
'.js-unfold'
).
click
end
...
...
spec/features/notes_on_merge_requests_spec.rb
View file @
e14d517b
...
...
@@ -223,8 +223,7 @@ describe 'Comments' do
sample_compare
.
changes
.
last
[
:line_code
]
end
def
click_diff_line
(
data
=
nil
)
data
||=
line_code
find
(
"button[data-line-code=
\"
#{
data
}
\"
]"
).
click
def
click_diff_line
(
data
=
line_code
)
page
.
find
(
%Q{button[data-line-code="
#{
data
}
"]}
,
visible:
false
).
click
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