diff --git a/src/plugins/condition/ConditionSetViewProvider.js b/src/plugins/condition/ConditionSetViewProvider.js index 35ba80ec25..da6b30d1e8 100644 --- a/src/plugins/condition/ConditionSetViewProvider.js +++ b/src/plugins/condition/ConditionSetViewProvider.js @@ -27,7 +27,7 @@ export default function ConditionSet(openmct) { return { key: 'conditionSet', name: 'Condition Set', - cssClass: 'icon-summary-widget', + cssClass: 'icon-folder', canView: function (domainObject) { return domainObject.type === 'conditionSet'; }, diff --git a/src/plugins/condition/plugin.js b/src/plugins/condition/plugin.js index 93bc7bc909..d0c88e1639 100644 --- a/src/plugins/condition/plugin.js +++ b/src/plugins/condition/plugin.js @@ -19,6 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ +import ConditionSetViewProvider from './ConditionSetViewProvider.js'; export default function ConditionSetPlugin() { const conditionSetType = { @@ -26,7 +27,7 @@ export default function ConditionSetPlugin() { key: 'conditionSet', description: 'A set of one or more conditional rules based on user-specified criteria.', creatable: true, - cssClass: 'icon-summary-widget', + cssClass: 'icon-folder', initialize: function (domainObject) { domainObject.composition = []; domainObject.telemetry = {}; @@ -34,6 +35,8 @@ export default function ConditionSetPlugin() { }; return function install(openmct) { + openmct.objectViews.addProvider(new ConditionSetViewProvider(openmct)); + openmct.types.addType('conditionSet', conditionSetType); }; } diff --git a/src/plugins/condition/pluginSpec.js b/src/plugins/condition/pluginSpec.js index c8c18a949d..cbd442306b 100644 --- a/src/plugins/condition/pluginSpec.js +++ b/src/plugins/condition/pluginSpec.js @@ -25,28 +25,32 @@ import { createOpenMct } from 'testTools'; fdescribe("The plugin", () => { let openmct; - let conditionSetType; let mockDomainObject; beforeEach(() => { - mockDomainObject = {}; - openmct = createOpenMct(); openmct.install(new ConditionSetPlugin()); - conditionSetType = openmct.types.get('conditionSet'); + + mockDomainObject = { + identifier: { + key: 'testKey', + namespace: '' + }, + type: 'conditionSet' + }; }); - it('defines a conditionSet object with the correct key', () => { - expect(conditionSetType.definition.key).toEqual('conditionSet'); + it('defines a conditionSet object type with the correct key', () => { + expect(openmct.types.get('conditionSet').definition.key).toEqual('conditionSet'); }); - it('defines a conditionSet object that is creatable', () => { - expect(conditionSetType.definition.creatable).toBeTrue(); + it('defines a conditionSet object type that is creatable', () => { + expect(openmct.types.get('conditionSet').definition.creatable).toBeTrue(); }); describe("shows the conditionSet object is initialized with", () => { beforeEach(() => { - conditionSetType.definition.initialize(mockDomainObject); + openmct.types.get('conditionSet').definition.initialize(mockDomainObject); }); it('a composition array', () => {