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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fa6f8d86
Commit
fa6f8d86
authored
Nov 11, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed multi line comment feature specs
parent
987bb28d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
spec/features/merge_request/user_comments_on_diff_spec.rb
spec/features/merge_request/user_comments_on_diff_spec.rb
+6
-5
No files found.
spec/features/merge_request/user_comments_on_diff_spec.rb
View file @
fa6f8d86
...
@@ -129,10 +129,11 @@ RSpec.describe 'User comments on a diff', :js do
...
@@ -129,10 +129,11 @@ RSpec.describe 'User comments on a diff', :js do
visit
(
diffs_project_merge_request_path
(
project
,
merge_request
,
view:
'parallel'
))
visit
(
diffs_project_merge_request_path
(
project
,
merge_request
,
view:
'parallel'
))
end
end
it
'allows comments to start above hidden lines and end below'
do
# In `files/ruby/popen.rb`
# click +28, select 21 add and verify comment
it
'allows comments for changes involving both sides'
do
click_diff_line
(
find
(
'div[data-path="files/ruby/popen.rb"] .new_line a[data-linenumber="28"]'
).
find
(
:xpath
,
'../..'
),
'right'
)
# click +15, select -13 add and verify comment
add_comment
(
'21'
,
'+28'
)
click_diff_line
(
find
(
'div[data-path="files/ruby/popen.rb"] .new_line a[data-linenumber="15"]'
).
find
(
:xpath
,
'../..'
),
'right'
)
add_comment
(
'-13'
,
'+15'
)
end
end
it
'allows comments on previously hidden lines at the top of a file'
do
it
'allows comments on previously hidden lines at the top of a file'
do
...
@@ -159,7 +160,7 @@ RSpec.describe 'User comments on a diff', :js do
...
@@ -159,7 +160,7 @@ RSpec.describe 'User comments on a diff', :js do
all
(
'.js-unfold-down'
)[
1
].
click
all
(
'.js-unfold-down'
)[
1
].
click
end
end
click_diff_line
(
find
(
'div[data-path="files/ruby/popen.rb"] .old_line a[data-linenumber="30"]'
).
find
(
:xpath
,
'../..'
),
'left'
)
click_diff_line
(
find
(
'div[data-path="files/ruby/popen.rb"] .old_line a[data-linenumber="30"]'
).
find
(
:xpath
,
'../..'
),
'left'
)
add_comment
(
'
-9'
,
'30
'
)
add_comment
(
'
+28'
,
'37
'
)
end
end
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