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