Fix some failing spec after sequence module change
This commit is contained in:
@@ -25,7 +25,7 @@ jasmine.stubRequests = ->
|
||||
else if match = settings.url.match /static\/subs\/(.+)\.srt\.sjson/
|
||||
settings.success jasmine.stubbedCaption
|
||||
else if settings.url == '/calculate' ||
|
||||
settings.url == '/6002x/modx/sequential/1/goto_position' ||
|
||||
settings.url == '/6002x/modx/sequence/1/goto_position' ||
|
||||
settings.url.match(/event$/) ||
|
||||
settings.url.match(/6002x\/modx\/problem\/.+\/problem_(check|reset|show|save)$/)
|
||||
# do nothing
|
||||
|
||||
@@ -9,7 +9,7 @@ describe 'Sequence', ->
|
||||
|
||||
describe 'constructor', ->
|
||||
beforeEach ->
|
||||
@sequence = new Sequence '1', @items, 1
|
||||
@sequence = new Sequence '1', @items, 'sequence', 1
|
||||
|
||||
it 'set the element', ->
|
||||
expect(@sequence.element).toEqual $('#sequence_1')
|
||||
@@ -32,7 +32,7 @@ describe 'Sequence', ->
|
||||
|
||||
describe 'toggleArrows', ->
|
||||
beforeEach ->
|
||||
@sequence = new Sequence '1', @items, 1
|
||||
@sequence = new Sequence '1', @items, 'sequence', 1
|
||||
|
||||
describe 'when the first tab is active', ->
|
||||
beforeEach ->
|
||||
@@ -74,7 +74,7 @@ describe 'Sequence', ->
|
||||
describe 'render', ->
|
||||
beforeEach ->
|
||||
spyOn $, 'postWithPrefix'
|
||||
@sequence = new Sequence '1', @items
|
||||
@sequence = new Sequence '1', @items, 'sequence'
|
||||
spyOnEvent @sequence.element, 'contentChanged'
|
||||
|
||||
describe 'with a different position than the current one', ->
|
||||
@@ -94,7 +94,7 @@ describe 'Sequence', ->
|
||||
expect($('[data-element="2"]')).toHaveClass 'seq_video_visited'
|
||||
|
||||
it 'save the new position', ->
|
||||
expect($.postWithPrefix).toHaveBeenCalledWith '/modx/sequential/1/goto_position', position: 1
|
||||
expect($.postWithPrefix).toHaveBeenCalledWith '/modx/sequence/1/goto_position', position: 1
|
||||
|
||||
it 'mark new tab as active', ->
|
||||
expect($('[data-element="1"]')).toHaveClass 'seq_video_active'
|
||||
@@ -117,7 +117,7 @@ describe 'Sequence', ->
|
||||
describe 'goto', ->
|
||||
beforeEach ->
|
||||
jasmine.stubRequests()
|
||||
@sequence = new Sequence '1', @items, 2
|
||||
@sequence = new Sequence '1', @items, 'sequence', 2
|
||||
$('[data-element="3"]').click()
|
||||
|
||||
it 'log the sequence goto event', ->
|
||||
@@ -129,7 +129,7 @@ describe 'Sequence', ->
|
||||
describe 'next', ->
|
||||
beforeEach ->
|
||||
jasmine.stubRequests()
|
||||
@sequence = new Sequence '1', @items, 2
|
||||
@sequence = new Sequence '1', @items, 'sequence', 2
|
||||
$('.sequence-nav-buttons .next a').click()
|
||||
|
||||
it 'log the next sequence event', ->
|
||||
@@ -141,7 +141,7 @@ describe 'Sequence', ->
|
||||
describe 'previous', ->
|
||||
beforeEach ->
|
||||
jasmine.stubRequests()
|
||||
@sequence = new Sequence '1', @items, 2
|
||||
@sequence = new Sequence '1', @items, 'sequence', 2
|
||||
$('.sequence-nav-buttons .prev a').click()
|
||||
|
||||
it 'log the previous sequence event', ->
|
||||
|
||||
Reference in New Issue
Block a user