Commit 84322694 by Miles Steele

add jasmine test for scroll to top

parent 83d12cd7
......@@ -134,6 +134,7 @@ xdescribe 'Sequence', ->
beforeEach ->
jasmine.stubRequests()
@sequence = new Sequence '1', 'sequence_1', @items, 'sequence', 2
$.scrollTo 150
$('.sequence-nav-buttons .next a').click()
it 'log the next sequence event', ->
......@@ -142,10 +143,14 @@ xdescribe 'Sequence', ->
it 'call render on the next sequence', ->
expect($('#seq_content').html()).toEqual 'Sample Problem'
it 'scrolls to the top of the page', ->
expect($('body').scrollTop()).toBe 0
describe 'previous', ->
beforeEach ->
jasmine.stubRequests()
@sequence = new Sequence '1', 'sequence_1', @items, 'sequence', 2
$.scrollTo 150
$('.sequence-nav-buttons .prev a').click()
it 'log the previous sequence event', ->
......@@ -154,6 +159,9 @@ xdescribe 'Sequence', ->
it 'call render on the previous sequence', ->
expect($('#seq_content').html()).toEqual 'Video 1'
it 'scrolls to the top of the page', ->
expect($('body').scrollTop()).toBe 0
describe 'link_for', ->
it 'return a link for specific position', ->
sequence = new Sequence '1', 'sequence_1', @items, 2
......
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