mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Mobile] Tests
Changed BrowseController and RemoveActionSpec to account for grandparent and navigation usage. Also changed RemoveAction variable name.
This commit is contained in:
parent
bdf8b4d3f1
commit
12ec293f3d
@ -70,8 +70,9 @@ define(
|
||||
}
|
||||
|
||||
function checkCurrentObjectNavigation(parent) {
|
||||
var currParent = navigationService.getNavigation().getCapability('context').getParent();
|
||||
if (currParent.getId() === parent.getId()) {
|
||||
var currentParent = navigationService.getNavigation()
|
||||
.getCapability('context').getParent();
|
||||
if (currentParent.getId() === parent.getId()) {
|
||||
navigationService.setNavigation(parent);
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,9 @@ define(
|
||||
},
|
||||
useCapability: function (k, v) {
|
||||
return capabilities[k].invoke(v);
|
||||
},
|
||||
getId: function () {
|
||||
return "test";
|
||||
}
|
||||
};
|
||||
mockContext = jasmine.createSpyObj("context", [ "getParent" ]);
|
||||
@ -80,13 +83,14 @@ define(
|
||||
"removeListener"
|
||||
]
|
||||
);
|
||||
mockNavigationService.getNavigation.andReturn(mockDomainObject);
|
||||
|
||||
|
||||
mockDomainObject.getId.andReturn("test");
|
||||
mockDomainObject.getCapability.andReturn(mockContext);
|
||||
mockContext.getParent.andReturn(mockParent);
|
||||
mockType.hasFeature.andReturn(true);
|
||||
|
||||
|
||||
capabilities = {
|
||||
mutation: mockMutation,
|
||||
persistence: mockPersistence,
|
||||
|
Loading…
Reference in New Issue
Block a user