This commit is contained in:
Joel McKinnon 2019-12-18 11:50:10 -08:00
parent ad64f00608
commit 6a25cb0a58
2 changed files with 11 additions and 10 deletions

View File

@ -23,6 +23,7 @@
export default function ConditionSetPlugin() {
const conditionSetType = {
name: 'Condition Set',
key: 'conditionSet',
description: 'A set of one or more conditional rules based on user-specified criteria.',
creatable: true,
cssClass: 'icon-summary-widget',

View File

@ -20,33 +20,33 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
import ConditionPlugin from './plugin';
import ConditionSetPlugin from './plugin';
import { createOpenMct } from 'testTools';
fdescribe("The plugin", () => {
let openmct;
let conditionType;
let conditionSetType;
let mockDomainObject;
beforeEach(() => {
mockDomainObject = {};
openmct = createOpenMct();
openmct.install(new ConditionPlugin());
conditionType = openmct.types.get('condition');
openmct.install(new ConditionSetPlugin());
conditionSetType = openmct.types.get('conditionSet');
});
it('defines a condition object with the correct name', () => {
expect(conditionType.definition.name).toEqual('Condition');
it('defines a conditionSet object with the correct key', () => {
expect(conditionSetType.definition.key).toEqual('conditionSet');
});
it('defines a condition object that is creatable', () => {
expect(conditionType.definition.creatable).toBeTrue();
it('defines a conditionSet object that is creatable', () => {
expect(conditionSetType.definition.creatable).toBeTrue();
});
describe("shows the condition object is initialized with", () => {
describe("shows the conditionSet object is initialized with", () => {
beforeEach(() => {
conditionType.definition.initialize(mockDomainObject);
conditionSetType.definition.initialize(mockDomainObject);
});
it('a composition array', () => {