diff --git a/platform/commonUI/edit/test/actions/SaveAsActionSpec.js b/platform/commonUI/edit/test/actions/SaveAsActionSpec.js index dbdd1f9692..4ad8ffa215 100644 --- a/platform/commonUI/edit/test/actions/SaveAsActionSpec.js +++ b/platform/commonUI/edit/test/actions/SaveAsActionSpec.js @@ -179,9 +179,15 @@ define( }); it("hides the blocking dialog after saving", function () { - action.perform(); + var mockCallback = jasmine.createSpy(); + action.perform().then(mockCallback); expect(mockDialogService.showBlockingMessage).toHaveBeenCalled(); - expect(mockDialogService.dismiss).toHaveBeenCalled(); + waitsFor(function () { + return mockCallback.calls.length > 0; + }); + runs(function () { + expect(mockDialogService.dismiss).toHaveBeenCalled(); + }); }); });