mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[Edit] Add test cases
Add test cases for changes to Edit mode capability wrappers which reduce scope of Create menu's Save in to the object being edited, for WTD-922.
This commit is contained in:
@ -99,6 +99,17 @@ define(
|
||||
expect(captured.saved).toEqual(1);
|
||||
});
|
||||
|
||||
it("tracks the root object of the Edit mode subgraph", function () {
|
||||
// Root object is the first object exposed to the cache
|
||||
var domainObjects = ['a', 'b', 'c'].map(TestObject);
|
||||
domainObjects.forEach(function (obj) {
|
||||
cache.getEditableObject(obj);
|
||||
});
|
||||
expect(cache.isRoot(domainObjects[0])).toBeTruthy();
|
||||
expect(cache.isRoot(domainObjects[1])).toBeFalsy();
|
||||
expect(cache.isRoot(domainObjects[2])).toBeFalsy();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user