mirror of
https://github.com/nasa/openmct.git
synced 2025-01-02 03:16:41 +00:00
fix unit tests
This commit is contained in:
parent
d41fc27b55
commit
e0c5bca47d
@ -49,6 +49,7 @@ describe('ConditionManager', () => {
|
|||||||
};
|
};
|
||||||
let mockComposition;
|
let mockComposition;
|
||||||
let loader;
|
let loader;
|
||||||
|
let mockTimeSystems;
|
||||||
|
|
||||||
function mockAngularComponents() {
|
function mockAngularComponents() {
|
||||||
let mockInjector = jasmine.createSpyObj('$injector', ['get']);
|
let mockInjector = jasmine.createSpyObj('$injector', ['get']);
|
||||||
@ -111,6 +112,12 @@ describe('ConditionManager', () => {
|
|||||||
openmct.objects.observe.and.returnValue(function () {});
|
openmct.objects.observe.and.returnValue(function () {});
|
||||||
openmct.objects.mutate.and.returnValue(function () {});
|
openmct.objects.mutate.and.returnValue(function () {});
|
||||||
|
|
||||||
|
mockTimeSystems = {
|
||||||
|
key: 'utc'
|
||||||
|
};
|
||||||
|
openmct.time = jasmine.createSpyObj('time', ['getAllTimeSystems']);
|
||||||
|
openmct.time.getAllTimeSystems.and.returnValue([mockTimeSystems]);
|
||||||
|
|
||||||
conditionMgr = new ConditionManager(conditionSetDomainObject, openmct);
|
conditionMgr = new ConditionManager(conditionSetDomainObject, openmct);
|
||||||
|
|
||||||
conditionMgr.on('conditionSetResultUpdated', mockListener);
|
conditionMgr.on('conditionSetResultUpdated', mockListener);
|
||||||
|
@ -30,7 +30,8 @@ let openmct = {},
|
|||||||
testTelemetryObject,
|
testTelemetryObject,
|
||||||
conditionObj,
|
conditionObj,
|
||||||
conditionManager,
|
conditionManager,
|
||||||
mockBroadcastTelemetry;
|
mockBroadcastTelemetry,
|
||||||
|
mockTimeSystems;
|
||||||
|
|
||||||
describe("The condition", function () {
|
describe("The condition", function () {
|
||||||
|
|
||||||
@ -74,6 +75,12 @@ describe("The condition", function () {
|
|||||||
openmct.telemetry.subscribe.and.returnValue(function () {});
|
openmct.telemetry.subscribe.and.returnValue(function () {});
|
||||||
openmct.telemetry.getMetadata.and.returnValue(testTelemetryObject.telemetry.values);
|
openmct.telemetry.getMetadata.and.returnValue(testTelemetryObject.telemetry.values);
|
||||||
|
|
||||||
|
mockTimeSystems = {
|
||||||
|
key: 'utc'
|
||||||
|
};
|
||||||
|
openmct.time = jasmine.createSpyObj('time', ['getAllTimeSystems']);
|
||||||
|
openmct.time.getAllTimeSystems.and.returnValue([mockTimeSystems]);
|
||||||
|
|
||||||
testConditionDefinition = {
|
testConditionDefinition = {
|
||||||
id: '123-456',
|
id: '123-456',
|
||||||
configuration: {
|
configuration: {
|
||||||
|
Loading…
Reference in New Issue
Block a user