diff --git a/platform/features/layout/test/FixedControllerSpec.js b/platform/features/layout/test/FixedControllerSpec.js index e9b131e8fd..c8b943cc62 100644 --- a/platform/features/layout/test/FixedControllerSpec.js +++ b/platform/features/layout/test/FixedControllerSpec.js @@ -272,8 +272,6 @@ define( .toHaveBeenCalledWith(jasmine.any(String)); }); - - it("unsubscribes when destroyed", function () { // Make an object available findWatch('domainObject')(mockDomainObject); @@ -284,6 +282,12 @@ define( // Should have unsubscribed expect(mockSubscription.unsubscribe).toHaveBeenCalled(); }); + + it("exposes its grid size", function () { + // Template needs to be able to pass this into line + // elements to size SVGs appropriately + expect(controller.getGridSize()).toEqual(testGrid); + }); }); } ); \ No newline at end of file diff --git a/platform/features/layout/test/FixedProxySpec.js b/platform/features/layout/test/FixedProxySpec.js index f5fd464a7b..dde97fa142 100644 --- a/platform/features/layout/test/FixedProxySpec.js +++ b/platform/features/layout/test/FixedProxySpec.js @@ -29,6 +29,23 @@ define( proxy.add("fixed.box"); expect(mockQ.when).toHaveBeenCalled(); }); + + it("notifies its callback when an element is created", function () { + proxy.add("fixed.box"); + // Callback should not have been invoked yet + expect(mockCallback).not.toHaveBeenCalled(); + // Resolve the promise + mockPromise.then.mostRecentCall.args[0]({}); + // Should have fired the callback + expect(mockCallback).toHaveBeenCalledWith({ + type: "fixed.box", + x: 0, + y: 0, + width: 1, + height: 1 + }); + }); + }); } );