From dc4436e890466fe64e4e7112d07362874f4d8dd2 Mon Sep 17 00:00:00 2001 From: Shivam Dave Date: Mon, 22 Jun 2015 15:15:46 -0700 Subject: [PATCH] [Windowing] Unit Test Adjustment Added comments to the NewWindowActionSpec.js file. WTD-16. --- .../commonUI/browse/test/windowing/NewWindowActionSpec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/commonUI/browse/test/windowing/NewWindowActionSpec.js b/platform/commonUI/browse/test/windowing/NewWindowActionSpec.js index 327096e8a3..17d3ac586c 100644 --- a/platform/commonUI/browse/test/windowing/NewWindowActionSpec.js +++ b/platform/commonUI/browse/test/windowing/NewWindowActionSpec.js @@ -32,6 +32,9 @@ define( mockCurrentUrl; beforeEach(function () { + // Creates a mockWindow from $window, then + // the mockWindow's location.href is set + // to a mock Url mockWindow = jasmine.createSpyObj("$window", ["open", "location"]); mockWindow.location.href = "http://www.mockUrl.com"; action = new NewWindowAction(mockWindow); @@ -39,6 +42,8 @@ define( }); it("New window is opened", function () { + // The expection is that the mockWindow + // will be called with it's location.href action.perform(); expect(mockWindow.open).toHaveBeenCalledWith("http://www.mockUrl.com"); });