Re-enable the video translation Jasmine tests

TNL-2689
This commit is contained in:
Andy Armstrong
2015-07-08 13:28:37 -04:00
parent 9e5290c1a7
commit 14a9796cd4
4 changed files with 143 additions and 100 deletions

View File

@@ -28,7 +28,7 @@ require ["jquery", "backbone", "coffee/src/main", "common/js/spec_helpers/ajax_h
appendSetFixtures(sandbox({id: "page-notification"}))
it "successful AJAX request does not pop an error notification", ->
server = AjaxHelpers['server'](200, this)
server = AjaxHelpers.server(this, [200, {}, ''])
expect($("#page-notification")).toBeEmpty()
$.ajax("/test")
@@ -37,7 +37,7 @@ require ["jquery", "backbone", "coffee/src/main", "common/js/spec_helpers/ajax_h
expect($("#page-notification")).toBeEmpty()
it "AJAX request with error should pop an error notification", ->
server = AjaxHelpers['server'](500, this)
server = AjaxHelpers.server(this, [500, {}, ''])
$.ajax("/test")
server.respond()
@@ -45,7 +45,7 @@ require ["jquery", "backbone", "coffee/src/main", "common/js/spec_helpers/ajax_h
expect($("#page-notification")).toContain('div.wrapper-notification-error')
it "can override AJAX request with error so it does not pop an error notification", ->
server = AjaxHelpers['server'](500, this)
server = AjaxHelpers.server(this, [500, {}, ''])
$.ajax
url: "/test"

View File

@@ -34,7 +34,7 @@ define ["js/models/section", "common/js/spec_helpers/ajax_helpers", "js/utils/mo
})
it "show/hide a notification when it saves to the server", ->
server = AjaxHelpers['server'](200, this)
server = AjaxHelpers.server(this, [200, {}, ''])
@model.save()
expect(Section.prototype.showNotification).toHaveBeenCalled()
@@ -43,7 +43,7 @@ define ["js/models/section", "common/js/spec_helpers/ajax_helpers", "js/utils/mo
it "don't hide notification when saving fails", ->
# this is handled by the global AJAX error handler
server = AjaxHelpers['server'](500, this)
server = AjaxHelpers.server(this, [500, {}, ''])
@model.save()
server.respond()