mirror of
https://github.com/nasa/openmct.git
synced 2025-03-11 06:54:01 +00:00
renamed conditionCollection to conditionSet and made all filenames and references consistent
This commit is contained in:
parent
10c4340475
commit
65aea29cb9
@ -20,16 +20,16 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
import ConditionCollectionComponent from './components/ConditionCollection.vue';
|
||||
import ConditionSetComponent from './components/ConditionSet.vue';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default function ConditionCollection(openmct) {
|
||||
export default function ConditionSet(openmct) {
|
||||
return {
|
||||
key: 'conditionCollection',
|
||||
name: 'Condition Collection',
|
||||
key: 'conditionSet',
|
||||
name: 'Condition Set',
|
||||
cssClass: 'icon-page',
|
||||
canView: function (domainObject) {
|
||||
return domainObject.type === 'conditionCollection';
|
||||
return domainObject.type === 'conditionSet';
|
||||
},
|
||||
view: function (domainObject) {
|
||||
let component;
|
||||
@ -39,13 +39,13 @@ export default function ConditionCollection(openmct) {
|
||||
component = new Vue({
|
||||
el: element,
|
||||
components: {
|
||||
ConditionCollectionComponent
|
||||
ConditionSetComponent
|
||||
},
|
||||
provide: {
|
||||
openmct,
|
||||
domainObject
|
||||
},
|
||||
template: '<condition-collection-component></condition-collection-component>'
|
||||
template: '<condition-set-component></condition-set-component>'
|
||||
});
|
||||
},
|
||||
destroy: function (element) {
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div><!-- Condition Collection component contents will go here --></div>
|
||||
<div><!-- Condition Set component contents will go here --></div>
|
||||
</template>
|
||||
|
||||
<script>
|
@ -20,11 +20,11 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
export default function ConditionCollectionPlugin() {
|
||||
const conditionType = {
|
||||
name: 'Condition Collection',
|
||||
key: 'conditionCollection',
|
||||
description: 'A set of conditional rules based on user-specified criteria.',
|
||||
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',
|
||||
initialize: function (domainObject) {
|
||||
@ -34,6 +34,6 @@ export default function ConditionCollectionPlugin() {
|
||||
};
|
||||
|
||||
return function install(openmct) {
|
||||
openmct.types.addType('conditionCollection', conditionType);
|
||||
openmct.types.addType('conditionSet', conditionSetType);
|
||||
};
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
import ConditionCollectionPlugin from './plugin';
|
||||
import ConditionSetPlugin from './plugin';
|
||||
import { createOpenMct } from 'testTools';
|
||||
|
||||
fdescribe("The plugin", () => {
|
||||
@ -29,28 +29,28 @@ fdescribe("The plugin", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
openmct = createOpenMct();
|
||||
openmct.install(new ConditionCollectionPlugin());
|
||||
openmct.install(new ConditionSetPlugin());
|
||||
|
||||
mockDomainObject = {
|
||||
identifier: {
|
||||
key: 'testKey',
|
||||
namespace: ''
|
||||
},
|
||||
type: 'conditionCollection'
|
||||
type: 'conditionSet'
|
||||
};
|
||||
});
|
||||
|
||||
it('defines a condition collection object type with the correct key', () => {
|
||||
expect(openmct.types.get('conditionCollection').definition.key).toEqual('conditionCollection');
|
||||
it('defines a conditionSet object type with the correct key', () => {
|
||||
expect(openmct.types.get('conditionSet').definition.key).toEqual('conditionSet');
|
||||
});
|
||||
|
||||
it('defines a condition collection object type that is creatable', () => {
|
||||
expect(openmct.types.get('conditionCollection').definition.creatable).toBeTrue();
|
||||
it('defines a conditionSet object type that is creatable', () => {
|
||||
expect(openmct.types.get('conditionSet').definition.creatable).toBeTrue();
|
||||
});
|
||||
|
||||
describe("shows the condition collection object is initialized with", () => {
|
||||
describe("shows the conditionSet object is initialized with", () => {
|
||||
beforeEach(() => {
|
||||
openmct.types.get('conditionCollection').definition.initialize(mockDomainObject);
|
||||
openmct.types.get('conditionSet').definition.initialize(mockDomainObject);
|
||||
});
|
||||
|
||||
it('a composition array', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user