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
dd6daf46
Commit
dd6daf46
authored
Jul 17, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case for clicking line number anchor icon
parent
4998f7a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
spec/javascripts/fixtures/line_highlighter.html.haml
spec/javascripts/fixtures/line_highlighter.html.haml
+3
-1
spec/javascripts/line_highlighter_spec.js.coffee
spec/javascripts/line_highlighter_spec.js.coffee
+8
-0
No files found.
spec/javascripts/fixtures/line_highlighter.html.haml
View file @
dd6daf46
...
...
@@ -2,7 +2,9 @@
.file-content
.line-numbers
-
1
.
upto
(
25
)
do
|
i
|
%a
{
href:
"#L#{i}"
,
id:
"L#{i}"
,
'data-line-number'
=>
i
}=
i
%a
{
href:
"#L#{i}"
,
id:
"L#{i}"
,
'data-line-number'
=>
i
}
%i
.fa.fa-link
=
i
%pre
.code.highlight
%code
-
1
.
upto
(
25
)
do
|
i
|
...
...
spec/javascripts/line_highlighter_spec.js.coffee
View file @
dd6daf46
...
...
@@ -48,6 +48,14 @@ describe 'LineHighlighter', ->
clickLine
(
13
)
expect
(
spy
).
toHaveBeenPrevented
()
it
'handles clicking on a child icon element'
,
->
spy
=
spyOn
(
@
class
,
'setHash'
).
and
.
callThrough
()
$
(
'#L13 i'
).
mousedown
().
click
()
expect
(
spy
).
toHaveBeenCalledWith
(
13
)
expect
(
$
(
'#LC13'
)).
toHaveClass
(
@
css
)
describe
'without shiftKey'
,
->
it
'highlights one line when clicked'
,
->
clickLine
(
13
)
...
...
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