mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 12:48:14 +00:00
[Mobile] CleanUp/Tests
Added tests inside spec files for the QueryService, TreeNodeController, and InfoGesture. Also cleaned up the tree so that padding is used between buttons instead of margins.
This commit is contained in:
@ -29,6 +29,7 @@ define(
|
||||
describe("The tree node controller", function () {
|
||||
var mockScope,
|
||||
mockTimeout,
|
||||
mockQueryService,
|
||||
controller;
|
||||
|
||||
function TestObject(id, context) {
|
||||
@ -43,7 +44,8 @@ define(
|
||||
beforeEach(function () {
|
||||
mockScope = jasmine.createSpyObj("$scope", ["$watch", "$on"]);
|
||||
mockTimeout = jasmine.createSpy("$timeout");
|
||||
controller = new TreeNodeController(mockScope, mockTimeout);
|
||||
mockQueryService = jasmine.createSpyObj("queryService", ["isMobile"]);
|
||||
controller = new TreeNodeController(mockScope, mockTimeout, mockQueryService);
|
||||
});
|
||||
|
||||
it("allows tracking of expansion state", function () {
|
||||
@ -183,6 +185,10 @@ define(
|
||||
expect(controller.isSelected()).toBeFalsy();
|
||||
|
||||
});
|
||||
|
||||
it("check if tree node is in a mobile device", function () {
|
||||
controller.checkMobile();
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user