[Persistence] Update Save As spec

...to account for asynchrony in test case due to usage of
Promise.all
This commit is contained in:
Victor Woeltjen 2016-07-14 16:14:20 -07:00
parent 1f7cece8ec
commit 86fcf19066

View File

@ -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();
});
});
});