VRFS-2700 got tests running, except adding
This commit is contained in:
parent
c44c94671a
commit
c5bd550597
|
|
@ -29,23 +29,31 @@ describe "RecordingSource", ->
|
|||
@recSource.siteIsValid()
|
||||
expect(@recSource.checkmark).toBeVisible()
|
||||
|
||||
xit "initializes sources properly", ->
|
||||
expect(@recSource.hasSources()).toEqual(true)
|
||||
it "initializes sources properly", ->
|
||||
expect(@recSource.recording_sources.length).toEqual(1)
|
||||
|
||||
xit "adds source entries properly", ->
|
||||
@url += 'xx'
|
||||
@url = "https://www.youtube.com/watch?v=_wYtG7aQTHA"
|
||||
@server.respondWith("GET", '/api/data_validation?sitetype=rec_youtube&data=' + encodeURIComponent(@url),
|
||||
[200, { "content-type": "application/json" }, JSON.stringify({"message": "Valid Site", "data": @url, "recording_id" : "_wYtG7aQTHA"})])
|
||||
sinon.spy()
|
||||
@recSource.data_input.val(@url)
|
||||
@recSource.add_btn.click()
|
||||
@server.respond()
|
||||
expect(@recSource.state().state()).toEqual('resolved')
|
||||
expect(@server.containsRecordingUrl(@url)).toEqual(true)
|
||||
|
||||
it "rejects duplicate source entries", ->
|
||||
rec_src_len = @recSource.recording_sources.length
|
||||
@server.respondWith("GET", '/api/data_validation?sitetype=url&data=' + encodeURIComponent(@url),
|
||||
[200, { "content-type": "application/json" }, JSON.stringify({"message": "Valid Site"})])
|
||||
sinon.spy()
|
||||
@recSource.data_input.val(@url)
|
||||
@recSource.add_btn.click()
|
||||
@server.respond()
|
||||
expect(@siteValidator.state().state()).toEqual('resolved')
|
||||
expect(@server.containsRecordingUrl(@url)).toEqual(true)
|
||||
expect(@recSource.state().state()).toEqual('pending')
|
||||
expect(@recSource.recording_sources.length).toEqual(rec_src_len)
|
||||
|
||||
xit "rejects duplicate source entries", ->
|
||||
|
||||
xit "removes sources", ->
|
||||
it "removes sources", ->
|
||||
expect(@recSource.removeRecordingId('i_xFOmYxKYz')).toEqual(true)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue