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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
cdc031b6
Commit
cdc031b6
authored
Jul 12, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix expandable diffs
parent
3999b80e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/assets/javascripts/diff.js.coffee
app/assets/javascripts/diff.js.coffee
+1
-0
spec/features/expand_collapse_diffs_spec.rb
spec/features/expand_collapse_diffs_spec.rb
+3
-3
No files found.
app/assets/javascripts/diff.js.coffee
View file @
cdc031b6
class
@
Diff
class
@
Diff
UNFOLD_COUNT
=
20
UNFOLD_COUNT
=
20
constructor
:
->
constructor
:
->
$
(
'.files .diff-file'
).
singleFileDiff
()
@
filesCommentButton
=
$
(
'.files .diff-file'
).
filesCommentButton
()
@
filesCommentButton
=
$
(
'.files .diff-file'
).
filesCommentButton
()
$
(
document
).
off
(
'click'
,
'.js-unfold'
)
$
(
document
).
off
(
'click'
,
'.js-unfold'
)
...
...
spec/features/expand_collapse_diffs_spec.rb
View file @
cdc031b6
...
@@ -106,7 +106,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
...
@@ -106,7 +106,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
let
(
:comment_text
)
{
'A comment'
}
let
(
:comment_text
)
{
'A comment'
}
before
do
before
do
large_diff
.
find
(
'.
line_holder
'
,
match: :prefer_exact
).
hover
large_diff
.
find
(
'.
diff-line-num
'
,
match: :prefer_exact
).
hover
large_diff
.
find
(
'.add-diff-note'
).
click
large_diff
.
find
(
'.add-diff-note'
).
click
large_diff
.
find
(
'.note-textarea'
).
send_keys
comment_text
large_diff
.
find
(
'.note-textarea'
).
send_keys
comment_text
large_diff
.
find_button
(
'Comment'
).
click
large_diff
.
find_button
(
'Comment'
).
click
...
@@ -161,7 +161,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
...
@@ -161,7 +161,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
end
end
it
'does not make a new HTTP request'
do
it
'does not make a new HTTP request'
do
expect
(
evaluate_script
(
'ajaxUris'
)).
to
be_empty
expect
(
evaluate_script
(
'ajaxUris'
)).
not_to
include
(
a_string_matching
(
'small_diff.md'
))
end
end
end
end
end
end
...
@@ -199,7 +199,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
...
@@ -199,7 +199,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
end
end
it
'does not make a new HTTP request'
do
it
'does not make a new HTTP request'
do
expect
(
evaluate_script
(
'ajaxUris'
)).
to
be_empty
expect
(
evaluate_script
(
'ajaxUris'
)).
not_to
include
(
a_string_matching
(
'small_diff.md'
))
end
end
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