mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 22:28:13 +00:00
Merge pull request #758 from nasa/error-message-753
[Tree] Don't assume context capability is present
This commit is contained in:
@ -206,6 +206,21 @@ define([
|
||||
});
|
||||
});
|
||||
|
||||
describe("when a context-less object is selected", function () {
|
||||
beforeEach(function () {
|
||||
var testCapabilities = makeGenericCapabilities(),
|
||||
mockDomainObject =
|
||||
makeMockDomainObject('xyz', {}, testCapabilities);
|
||||
delete testCapabilities.context;
|
||||
treeView.value(mockDomainObject);
|
||||
});
|
||||
|
||||
it("clears all selection state", function () {
|
||||
var selected = $(treeView.elements()[0]).find('.selected');
|
||||
expect(selected.length).toEqual(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when children contain children", function () {
|
||||
beforeEach(function () {
|
||||
var newCapabilities = makeGenericCapabilities(),
|
||||
|
Reference in New Issue
Block a user