mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 03:06:54 +00:00
Merge pull request #1744 from nasa/inspector-issue-1276
Inspector issue 1276
This commit is contained in:
commit
8703f363b8
@ -108,8 +108,11 @@ define(
|
|||||||
|
|
||||||
getMetadata();
|
getMetadata();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
var mutation = $scope.ngModel.selectedObject.getCapability('mutation');
|
||||||
|
var unlisten = mutation.listen(getMetadata);
|
||||||
|
$scope.$on('$destroy', unlisten);
|
||||||
|
}
|
||||||
return ObjectInspectorController;
|
return ObjectInspectorController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -39,10 +39,18 @@ define(
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockScope = jasmine.createSpyObj(
|
mockScope = jasmine.createSpyObj(
|
||||||
"$scope",
|
"$scope",
|
||||||
["$watch"]
|
["$watch", "$on"]
|
||||||
);
|
);
|
||||||
mockScope.ngModel = {};
|
mockScope.ngModel = {};
|
||||||
mockScope.ngModel.selectedObject = 'mock selected object';
|
mockScope.ngModel.selectedObject = {
|
||||||
|
getCapability: function () {
|
||||||
|
return {
|
||||||
|
listen: function () {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
mockObjectService = jasmine.createSpyObj(
|
mockObjectService = jasmine.createSpyObj(
|
||||||
"objectService",
|
"objectService",
|
||||||
|
Loading…
Reference in New Issue
Block a user