mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 01:48:51 +00:00
Fixes failing tests
This commit is contained in:
parent
74a7ef2565
commit
81caa27cba
@ -27,6 +27,14 @@ describe('ConditionManager', () => {
|
||||
let conditionMgr;
|
||||
let mockListener;
|
||||
let openmct = {};
|
||||
let mockCondition = {
|
||||
isDefault: true,
|
||||
type: 'condition',
|
||||
id: '1234-5678',
|
||||
configuration: {
|
||||
criteria: []
|
||||
}
|
||||
};
|
||||
let conditionSetDomainObject = {
|
||||
identifier: {
|
||||
namespace: "",
|
||||
@ -35,14 +43,11 @@ describe('ConditionManager', () => {
|
||||
type: "conditionSet",
|
||||
location: "mine",
|
||||
configuration: {
|
||||
conditionCollection: []
|
||||
conditionCollection: [
|
||||
mockCondition
|
||||
]
|
||||
}
|
||||
};
|
||||
let mockCondition = {
|
||||
isDefault: true,
|
||||
type: 'condition',
|
||||
id: '1234-5678'
|
||||
};
|
||||
|
||||
function mockAngularComponents() {
|
||||
let mockInjector = jasmine.createSpyObj('$injector', ['get']);
|
||||
@ -87,9 +92,9 @@ describe('ConditionManager', () => {
|
||||
});
|
||||
|
||||
it('creates a conditionCollection with a default condition', function () {
|
||||
expect(conditionMgr.domainObject.configuration.conditionCollection.length).toEqual(1);
|
||||
let defaultCondition = conditionMgr.domainObject.configuration.conditionCollection[0];
|
||||
expect(defaultCondition).toEqual(mockCondition);
|
||||
expect(conditionMgr.conditionSetDomainObject.configuration.conditionCollection.length).toEqual(1);
|
||||
let defaultConditionId = conditionMgr.conditionClassCollection[0].id;
|
||||
expect(defaultConditionId).toEqual(mockCondition.id);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -64,6 +64,7 @@ describe("The condition", function () {
|
||||
openmct.telemetry.getMetadata.and.returnValue(testTelemetryObject.telemetry.values);
|
||||
|
||||
testConditionDefinition = {
|
||||
id: '123-456',
|
||||
configuration: {
|
||||
trigger: TRIGGER.ANY,
|
||||
criteria: [
|
||||
|
Loading…
Reference in New Issue
Block a user