diff --git a/platform/commonUI/dialog/test/DialogServiceSpec.js b/platform/commonUI/dialog/test/DialogServiceSpec.js index 584e793398..9f3635cd9e 100644 --- a/platform/commonUI/dialog/test/DialogServiceSpec.js +++ b/platform/commonUI/dialog/test/DialogServiceSpec.js @@ -56,7 +56,7 @@ define( it("allows user input to be canceled", function () { dialogService.getUserInput({}, { someKey: "some value" }); - mockOverlayService.createOverlay.mostRecentCall.args[0].cancel(); + mockOverlayService.createOverlay.mostRecentCall.args[1].cancel(); expect(mockDeferred.reject).toHaveBeenCalled(); expect(mockDeferred.resolve).not.toHaveBeenCalled(); }); @@ -64,7 +64,7 @@ define( it("passes back the result of user input when confirmed", function () { var value = { someKey: 42 }; dialogService.getUserInput({}, value); - mockOverlayService.createOverlay.mostRecentCall.args[0].confirm(); + mockOverlayService.createOverlay.mostRecentCall.args[1].confirm(); expect(mockDeferred.reject).not.toHaveBeenCalled(); expect(mockDeferred.resolve).toHaveBeenCalledWith(value); }); @@ -80,7 +80,7 @@ define( it("can show multiple dialogs if prior ones are dismissed", function () { dialogService.getUserInput({}, {}); expect(mockLog.warn).not.toHaveBeenCalled(); - mockOverlayService.createOverlay.mostRecentCall.args[0].confirm(); + mockOverlayService.createOverlay.mostRecentCall.args[1].confirm(); dialogService.getUserInput({}, {}); expect(mockLog.warn).not.toHaveBeenCalled(); expect(mockDeferred.reject).not.toHaveBeenCalled(); diff --git a/platform/commonUI/dialog/test/OverlayServiceSpec.js b/platform/commonUI/dialog/test/OverlayServiceSpec.js index 0adde5a0ea..5506098571 100644 --- a/platform/commonUI/dialog/test/OverlayServiceSpec.js +++ b/platform/commonUI/dialog/test/OverlayServiceSpec.js @@ -8,7 +8,7 @@ define( function (OverlayService) { "use strict"; - describe("The dialog service", function () { + describe("The overlay service", function () { var mockDocument, mockCompile, mockRootScope, @@ -40,19 +40,19 @@ define( }); it("prepends an mct-include to create overlays", function () { - overlayService.createOverlay({}, "test"); + overlayService.createOverlay("test", {}); expect(mockCompile).toHaveBeenCalled(); expect(mockCompile.mostRecentCall.args[0].indexOf("mct-include")) .not.toEqual(-1); }); it("adds the templated element to the body", function () { - overlayService.createOverlay({}, "test"); + overlayService.createOverlay("test", {}); expect(mockBody.prepend).toHaveBeenCalledWith(mockElement); }); it("places the provided model/key in its template's scope", function () { - overlayService.createOverlay({ someKey: 42 }, "test"); + overlayService.createOverlay("test", { someKey: 42 }); expect(mockScope.overlay).toEqual({ someKey: 42 }); expect(mockScope.key).toEqual("test"); @@ -61,7 +61,7 @@ define( }); it("removes the prepended element on request", function () { - var overlay = overlayService.createOverlay({}, "test"); + var overlay = overlayService.createOverlay("test", {}); // Verify precondition expect(mockElement.remove).not.toHaveBeenCalled();