mirror of
https://github.com/nasa/openmct.git
synced 2025-05-07 19:18:36 +00:00
test fix (#4569)
This commit is contained in:
parent
08b1c4ae74
commit
e18c7562ae
@ -15,7 +15,15 @@ describe("Transaction Class", () => {
|
|||||||
|
|
||||||
return object;
|
return object;
|
||||||
},
|
},
|
||||||
refresh: (object) => Promise.resolve(object)
|
refresh: (object) => Promise.resolve(object),
|
||||||
|
areIdsEqual: (...identifiers) => {
|
||||||
|
return identifiers.map(utils.parseKeyString)
|
||||||
|
.every(identifier => {
|
||||||
|
return identifier === identifiers[0]
|
||||||
|
|| (identifier.namespace === identifiers[0].namespace
|
||||||
|
&& identifier.key === identifiers[0].key);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
transaction = new Transaction(objectAPI);
|
transaction = new Transaction(objectAPI);
|
||||||
|
@ -122,6 +122,7 @@ describe("The import JSON action", function () {
|
|||||||
];
|
];
|
||||||
|
|
||||||
spyOn(openmct.forms, 'showForm').and.returnValue(Promise.resolve({}));
|
spyOn(openmct.forms, 'showForm').and.returnValue(Promise.resolve({}));
|
||||||
|
spyOn(importFromJSONAction, 'onSave').and.returnValue(Promise.resolve({}));
|
||||||
importFromJSONAction.invoke(objectPath);
|
importFromJSONAction.invoke(objectPath);
|
||||||
|
|
||||||
expect(openmct.forms.showForm).toHaveBeenCalled();
|
expect(openmct.forms.showForm).toHaveBeenCalled();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user