BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
66154286
Commit
66154286
authored
Jul 18, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-issue-988-test' into 'master'
Add test case for clicking line number anchor icon Follow-up to !988 See merge request !992
parents
4998f7a0
dd6daf46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
line_highlighter.html.haml
spec/javascripts/fixtures/line_highlighter.html.haml
+3
-1
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 @
66154286
...
...
@@ -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 @
66154286
...
...
@@ -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