Commit aee139ae by Usman Khalid

Cancel modals in afterEach in UploadDialog spec.

parent 66b53926
...@@ -15,8 +15,7 @@ define ["js/models/uploads", "js/views/uploads", "js/models/chapter", "common/js ...@@ -15,8 +15,7 @@ define ["js/models/uploads", "js/views/uploads", "js/models/chapter", "common/js
afterEach -> afterEach ->
delete CMS.URL.UPLOAD_ASSET delete CMS.URL.UPLOAD_ASSET
if (@lastView && modal_helpers.isShowingModal(@lastView)) modal_helpers.cancelModalIfShowing()
@lastView.hide()
createTestView = (test) -> createTestView = (test) ->
view = new UploadDialog( view = new UploadDialog(
...@@ -99,6 +98,7 @@ define ["js/models/uploads", "js/views/uploads", "js/models/chapter", "common/js ...@@ -99,6 +98,7 @@ define ["js/models/uploads", "js/views/uploads", "js/models/chapter", "common/js
@clock = sinon.useFakeTimers() @clock = sinon.useFakeTimers()
afterEach -> afterEach ->
modal_helpers.cancelModalIfShowing()
@clock.restore() @clock.restore()
it "can upload correctly", -> it "can upload correctly", ->
......
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