BigW Consortium Gitlab

Commit 66154286 by Robert Speicher

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
......@@ -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|
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment