mirror of
https://github.com/nasa/openmct.git
synced 2025-05-10 20:43:00 +00:00
Moves condition class initialization to conditionEdit component
sets correct condition output in condition edit component
This commit is contained in:
parent
8fc785bbd6
commit
cdb7066bed
@ -55,13 +55,24 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
|
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
this.id = this.openmct.objects.makeKeyString(conditionDefinition.identifier);
|
this.id = this.openmct.objects.makeKeyString(conditionDefinition.identifier);
|
||||||
if (conditionDefinition.criteria) {
|
this.criteria = [];
|
||||||
this.createCriteria(conditionDefinition.criteria);
|
if (conditionDefinition.definition.criteria) {
|
||||||
} else {
|
this.createCriteria(conditionDefinition.definition.criteria);
|
||||||
this.criteria = [];
|
|
||||||
}
|
}
|
||||||
this.trigger = conditionDefinition.trigger;
|
this.trigger = conditionDefinition.definition.trigger;
|
||||||
this.result = null;
|
this.result = null;
|
||||||
|
this.openmct.objects.get(this.id).then(obj => this.observeForChanges(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
observeForChanges(conditionDO) {
|
||||||
|
this.stopObservingForChanges = this.openmct.objects.observe(conditionDO, '*', this.update.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
update(newDomainObject) {
|
||||||
|
console.log('ConditionClass: ', newDomainObject.definition);
|
||||||
|
this.updateTrigger(newDomainObject.definition.trigger);
|
||||||
|
this.updateCriteria(newDomainObject.definition.criteria);
|
||||||
|
this.handleConditionUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTrigger(conditionDefinition) {
|
updateTrigger(conditionDefinition) {
|
||||||
@ -103,6 +114,7 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
this.criteria = [];
|
this.criteria = [];
|
||||||
}
|
}
|
||||||
this.criteria.push(criterion);
|
this.criteria.push(criterion);
|
||||||
|
//Do we need this here?
|
||||||
this.handleConditionUpdated();
|
this.handleConditionUpdated();
|
||||||
return criterionDefinitionWithId.id;
|
return criterionDefinitionWithId.id;
|
||||||
}
|
}
|
||||||
@ -147,7 +159,7 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
let found = this.findCriterion(id);
|
let found = this.findCriterion(id);
|
||||||
if (found) {
|
if (found) {
|
||||||
let criterion = found.item;
|
let criterion = found.item;
|
||||||
criterion.unsubscribe();
|
criterion.destroy();
|
||||||
criterion.off('criterionUpdated', (result) => {
|
criterion.off('criterionUpdated', (result) => {
|
||||||
this.handleCriterionUpdated(id, result);
|
this.handleCriterionUpdated(id, result);
|
||||||
});
|
});
|
||||||
@ -160,7 +172,8 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
handleCriterionUpdated(criterion) {
|
handleCriterionUpdated(criterion) {
|
||||||
let found = this.findCriterion(criterion.id);
|
let found = this.findCriterion(criterion.id);
|
||||||
if (found) {
|
if (found) {
|
||||||
this.criteria[found.index] = criterion;
|
this.criteria[found.index] = criterion.data;
|
||||||
|
//Most likely don't need this.
|
||||||
this.emitEvent('conditionUpdated', {
|
this.emitEvent('conditionUpdated', {
|
||||||
trigger: this.trigger,
|
trigger: this.trigger,
|
||||||
criteria: this.criteria
|
criteria: this.criteria
|
||||||
@ -171,7 +184,8 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
|
|
||||||
handleConditionUpdated() {
|
handleConditionUpdated() {
|
||||||
// trigger an updated event so that consumers can react accordingly
|
// trigger an updated event so that consumers can react accordingly
|
||||||
this.emitEvent('conditionResultUpdated');
|
this.evaluate();
|
||||||
|
this.emitEvent('conditionResultUpdated', {result: this.result});
|
||||||
}
|
}
|
||||||
|
|
||||||
getCriteria() {
|
getCriteria() {
|
||||||
@ -190,7 +204,7 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
//TODO: implement as part of the evaluator class task.
|
//TODO: implement as part of the evaluator class task.
|
||||||
evaluate() {
|
evaluate() {
|
||||||
if (this.trigger === TRIGGER.ANY) {
|
if (this.trigger === TRIGGER.ANY) {
|
||||||
this.result = false;
|
this.result = true;
|
||||||
} else if (this.trigger === TRIGGER.ALL) {
|
} else if (this.trigger === TRIGGER.ALL) {
|
||||||
this.result = false;
|
this.result = false;
|
||||||
}
|
}
|
||||||
@ -202,4 +216,11 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
if (typeof this.stopObservingForChanges === 'function') {
|
||||||
|
this.stopObservingForChanges();
|
||||||
|
}
|
||||||
|
this.destroyCriteria();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,10 +34,12 @@
|
|||||||
class="conditionArea"
|
class="conditionArea"
|
||||||
>
|
>
|
||||||
<div v-if="isEditing">
|
<div v-if="isEditing">
|
||||||
<ConditionEdit :conditionIdentifier="conditionIdentifier" />
|
<ConditionEdit :condition-identifier="conditionIdentifier"
|
||||||
|
@condition-result-updated="handleConditionResult"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<Condition :conditionIdentifier="conditionIdentifier" />
|
<Condition :condition-identifier="conditionIdentifier" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,7 +51,6 @@
|
|||||||
import Condition from '../../condition/components/Condition.vue';
|
import Condition from '../../condition/components/Condition.vue';
|
||||||
import ConditionEdit from '../../condition/components/ConditionEdit.vue';
|
import ConditionEdit from '../../condition/components/ConditionEdit.vue';
|
||||||
import uuid from 'uuid';
|
import uuid from 'uuid';
|
||||||
import ConditionClass from '../Condition';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inject: ['openmct', 'domainObject'],
|
inject: ['openmct', 'domainObject'],
|
||||||
@ -81,6 +82,9 @@ export default {
|
|||||||
if (!this.conditionCollection.length) {this.addCondition(null, true)}
|
if (!this.conditionCollection.length) {this.addCondition(null, true)}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleConditionResult(args) {
|
||||||
|
console.log('ConditionCollection: ', args.result);
|
||||||
|
},
|
||||||
addTelemetry(telemetryDomainObject) {
|
addTelemetry(telemetryDomainObject) {
|
||||||
this.telemetryObjs.push(telemetryDomainObject);
|
this.telemetryObjs.push(telemetryDomainObject);
|
||||||
},
|
},
|
||||||
@ -90,27 +94,25 @@ export default {
|
|||||||
this.openmct.objects.mutate(conditionDO, 'created', new Date());
|
this.openmct.objects.mutate(conditionDO, 'created', new Date());
|
||||||
|
|
||||||
this.conditionCollection.unshift(conditionDO.identifier);
|
this.conditionCollection.unshift(conditionDO.identifier);
|
||||||
|
|
||||||
let condition = new ConditionClass(conditionDO, this.openmct);
|
|
||||||
this.conditions.push(condition);
|
|
||||||
},
|
},
|
||||||
getConditionDomainObject(isDefault) {
|
getConditionDomainObject(isDefault) {
|
||||||
let conditionObj = {
|
let conditionObj = {
|
||||||
isDefault: isDefault,
|
isDefault: isDefault,
|
||||||
isCurrent: true,
|
|
||||||
identifier: {
|
identifier: {
|
||||||
namespace: this.domainObject.identifier.namespace,
|
namespace: this.domainObject.identifier.namespace,
|
||||||
key: uuid()
|
key: uuid()
|
||||||
},
|
},
|
||||||
name: isDefault ? 'Default' : 'Unnamed Condition',
|
definition: {
|
||||||
trigger: 'any',
|
name: isDefault ? 'Default' : 'Unnamed Condition',
|
||||||
criteria: isDefault ? [] : [{
|
output: 'false',
|
||||||
operation: '',
|
trigger: 'any',
|
||||||
input: '',
|
criteria: isDefault ? [] : [{
|
||||||
metaDataKey: this.openmct.telemetry.getMetadata(this.telemetryObjs[0]).values()[0].key,
|
operation: '',
|
||||||
key: this.telemetryObjs.length ? this.openmct.objects.makeKeyString(this.telemetryObjs[0].identifier) : null
|
input: '',
|
||||||
}],
|
metaDataKey: this.openmct.telemetry.getMetadata(this.telemetryObjs[0]).values()[0].key,
|
||||||
output: 'false',
|
key: this.telemetryObjs.length ? this.openmct.objects.makeKeyString(this.telemetryObjs[0].identifier) : null
|
||||||
|
}]
|
||||||
|
},
|
||||||
summary: 'summary description'
|
summary: 'summary description'
|
||||||
};
|
};
|
||||||
let conditionDOKeyString = this.openmct.objects.makeKeyString(conditionObj.identifier);
|
let conditionDOKeyString = this.openmct.objects.makeKeyString(conditionObj.identifier);
|
||||||
@ -119,6 +121,7 @@ export default {
|
|||||||
return newDO.useCapability('adapter');
|
return newDO.useCapability('adapter');
|
||||||
},
|
},
|
||||||
updateCondition(updatedCondition) {
|
updateCondition(updatedCondition) {
|
||||||
|
//TODO: this should only happen for reordering
|
||||||
let index = _.findIndex(this.conditions, (condition) => condition.id === updatedCondition.id);
|
let index = _.findIndex(this.conditions, (condition) => condition.id === updatedCondition.id);
|
||||||
this.conditions[index] = updatedCondition;
|
this.conditions[index] = updatedCondition;
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="c-cs-editui__conditions"
|
<div v-if="condition"
|
||||||
v-if="condition"
|
class="c-cs-editui__conditions"
|
||||||
:class="['widget-condition', { 'widget-condition--current': condition.isCurrent }]"
|
:class="['widget-condition', { 'widget-condition--current': condition.isCurrent }]"
|
||||||
>
|
>
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
@ -15,8 +15,8 @@
|
|||||||
@click="expanded = !condition.expanded"
|
@click="expanded = !condition.expanded"
|
||||||
></span>
|
></span>
|
||||||
<div class="condition-summary">
|
<div class="condition-summary">
|
||||||
<span class="condition-name">{{ condition.name }}</span>
|
<span class="condition-name">{{ condition.definition.name }}</span>
|
||||||
<span class="condition-description">{{ condition.description }}</span>
|
<span class="condition-description">{{ condition.definition.description }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="!condition.isDefault"
|
<span v-if="!condition.isDefault"
|
||||||
class="is-enabled c-c__duplicate"
|
class="is-enabled c-c__duplicate"
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<label>Condition Name</label>
|
<label>Condition Name</label>
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
<input v-model="condition.name"
|
<input v-model="condition.definition.name"
|
||||||
class="t-rule-name-input"
|
class="t-rule-name-input"
|
||||||
type="text"
|
type="text"
|
||||||
>
|
>
|
||||||
@ -48,18 +48,21 @@
|
|||||||
<li>
|
<li>
|
||||||
<label>Output</label>
|
<label>Output</label>
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
<select ref="outputSelect"
|
<select v-model="selectedOutputKey"
|
||||||
@change="getOutputBinary">
|
@change="checkInputValue"
|
||||||
<option value="false">False</option>
|
>
|
||||||
<option value="true">True</option>
|
<option value="">- Select Output -</option>
|
||||||
<option value="string">String</option>
|
<option v-for="option in outputOptions"
|
||||||
|
:key="option.key"
|
||||||
|
:value="option.key"
|
||||||
|
>
|
||||||
|
{{ option.text }}
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<input v-if="stringOutputField"
|
<input v-if="selectedOutputKey === outputOptions[2].key"
|
||||||
ref="outputString"
|
v-model="condition.definition.output"
|
||||||
class="t-rule-name-input"
|
class="t-rule-name-input"
|
||||||
type="text"
|
type="text"
|
||||||
:value="condition.output"
|
|
||||||
@keyup="getOutputString"
|
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@ -85,9 +88,11 @@
|
|||||||
<label>when</label>
|
<label>when</label>
|
||||||
<span class="t-configuration">
|
<span class="t-configuration">
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
<select class="">
|
<select v-model="selectedTelemetryKey"
|
||||||
|
class=""
|
||||||
|
>
|
||||||
<option value="">- Select Telemetry -</option>
|
<option value="">- Select Telemetry -</option>
|
||||||
<option :value="telemetryObject.key">{{ telemetryObject.name }}</option>
|
<option :value="telemetryObject.identifier">{{ telemetryObject.name }}</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
@ -131,6 +136,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OPERATIONS } from '../utils/operations';
|
import { OPERATIONS } from '../utils/operations';
|
||||||
|
import ConditionClass from "@/plugins/condition/Condition";
|
||||||
export default {
|
export default {
|
||||||
inject: ['openmct', 'domainObject'],
|
inject: ['openmct', 'domainObject'],
|
||||||
props: {
|
props: {
|
||||||
@ -148,95 +154,109 @@ export default {
|
|||||||
telemetryMetadata: this.telemetryMetadata,
|
telemetryMetadata: this.telemetryMetadata,
|
||||||
operations: OPERATIONS,
|
operations: OPERATIONS,
|
||||||
selectedMetaDataKey: null,
|
selectedMetaDataKey: null,
|
||||||
|
selectedTelemetryKey: null,
|
||||||
selectedOperationKey: null,
|
selectedOperationKey: null,
|
||||||
|
selectedOutputKey: null,
|
||||||
stringOutputField: false,
|
stringOutputField: false,
|
||||||
comparisonValueField: false
|
comparisonValueField: false,
|
||||||
|
outputOptions: [
|
||||||
|
{
|
||||||
|
key: 'false',
|
||||||
|
text: 'False'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'true',
|
||||||
|
text: 'True'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'string',
|
||||||
|
text: 'String'
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
destroyed() {
|
||||||
|
if (this.conditionClass && typeof this.conditionClass.destroy === 'function') {
|
||||||
|
this.conditionClass.destroy();
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.conditionCollection = this.domainObject.configuration.conditionCollection;
|
|
||||||
this.openmct.objects.get(this.conditionIdentifier).then((obj => {
|
this.openmct.objects.get(this.conditionIdentifier).then((obj => {
|
||||||
console.log('ConditionEdit obj', obj);
|
|
||||||
this.condition = obj;
|
this.condition = obj;
|
||||||
if (this.condition.output !== 'false' && this.condition.output !== 'true') {
|
this.conditionClass = new ConditionClass(this.condition, this.openmct);
|
||||||
this.$refs.outputSelect.value = 'string';
|
this.conditionClass.on('conditionResultUpdated', this.handleConditionResult.bind(this))
|
||||||
this.stringOutputField = true;
|
this.setOutput();
|
||||||
}
|
|
||||||
this.updateTelemetry();
|
this.updateTelemetry();
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
this.updateCurrentCondition();
|
|
||||||
this.persist();
|
this.persist();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
removeCondition(ev) {
|
handleConditionResult(args) {
|
||||||
const conditionDiv = ev.target.closest('.conditionArea');
|
console.log('ConditionEdit::Result', args);
|
||||||
const conditionCollectionDiv = conditionDiv.closest('.condition-collection');
|
this.$emit('condition-result-updated', {
|
||||||
const index = Array.from(conditionCollectionDiv.children).indexOf(conditionDiv);
|
id: this.conditionIdentifier,
|
||||||
|
result: args.data.result
|
||||||
this.domainObject.configuration.conditionCollection.splice(index, 1);
|
})
|
||||||
|
},
|
||||||
|
removeCondition(ev) { //move this to conditionCollection
|
||||||
|
// const conditionDiv = ev.target.closest('.conditionArea');
|
||||||
|
// const conditionCollectionDiv = conditionDiv.closest('.condition-collection');
|
||||||
|
// const index = Array.from(conditionCollectionDiv.children).indexOf(conditionDiv);
|
||||||
|
//
|
||||||
|
// this.domainObject.configuration.conditionCollection.splice(index, 1);
|
||||||
|
},
|
||||||
|
setOutput() {
|
||||||
|
if (this.condition.definition.output !== 'false' && this.condition.definition.output !== 'true') {
|
||||||
|
// this.$refs.outputSelect.value = 'string';
|
||||||
|
this.selectedOutputKey = this.outputOptions[2].key;
|
||||||
|
// this.stringOutputField = true;
|
||||||
|
} else {
|
||||||
|
if (this.condition.definition.output === 'true') {
|
||||||
|
this.selectedOutputKey = this.outputOptions[1].key;
|
||||||
|
} else {
|
||||||
|
this.selectedOutputKey = this.outputOptions[0].key;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateTelemetry() {
|
updateTelemetry() {
|
||||||
if (this.hasTelemetry()) {
|
if (this.hasTelemetry()) {
|
||||||
this.openmct.objects.get(this.condition.criteria[0].key).then((obj) => {
|
this.openmct.objects.get(this.condition.definition.criteria[0].key).then((obj) => {
|
||||||
this.telemetryObject = obj;
|
this.telemetryObject = obj;
|
||||||
this.telemetryMetadata = this.openmct.telemetry.getMetadata(this.telemetryObject).values();
|
this.telemetryMetadata = this.openmct.telemetry.getMetadata(this.telemetryObject).values();
|
||||||
this.selectedMetaDataKey = this.telemetryMetadata[0].key;
|
this.selectedMetaDataKey = this.telemetryMetadata[0].key;
|
||||||
console.log('ConditionEdit', this.telemetryObject, this.telemetryMetadata);
|
this.selectedTelemetryKey = this.telemetryObject.identifier;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.telemetryObject = null;
|
this.telemetryObject = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hasTelemetry() {
|
hasTelemetry() {
|
||||||
return this.condition.criteria.length && this.condition.criteria[0].key;
|
return this.condition.definition.criteria.length && this.condition.definition.criteria[0].key;
|
||||||
},
|
},
|
||||||
persist(index) {
|
persist(index) { //this should only persist the condition domain object
|
||||||
if (index) {
|
this.openmct.objects.mutate(this.condition, 'definition', this.condition.definition);
|
||||||
this.openmct.objects.mutate(this.domainObject, `configuration.conditionCollection[${index}]`, this.domainObject.configuration.conditionCollection[index]);
|
},
|
||||||
} else {
|
checkInputValue() {
|
||||||
this.openmct.objects.mutate(this.domainObject, 'configuration.conditionCollection', this.domainObject.configuration.conditionCollection);
|
if (this.selectedOutputKey === this.outputOptions[2].key) {
|
||||||
|
this.condition.definition.output = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateCurrentCondition() {
|
|
||||||
//mutate / persist the condition domainObject
|
|
||||||
//persist the condition DO so that we can do an openmct.objects.get on it and only persist the identifier in the conditionCollection of conditionSet
|
|
||||||
this.openmct.objects.mutate(this.condition, 'created', new Date());
|
|
||||||
//
|
|
||||||
// // TODO: replace based on telemetry
|
|
||||||
// if (this.conditionCollection.length > 1) {
|
|
||||||
// this.conditionCollection.forEach((condition, index) => {
|
|
||||||
// index === 0 ? condition.isCurrent = true : condition.isCurrent = false
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// this.conditionCollection[0].isCurrent = true;
|
|
||||||
// }
|
|
||||||
// console.log(this.condition);
|
|
||||||
// console.log(this.conditionCollection);
|
|
||||||
},
|
|
||||||
getOutputBinary(ev) {
|
|
||||||
if (ev.target.value !== 'string') {
|
|
||||||
this.condition.output = ev.target.value;
|
|
||||||
this.stringOutputField = false;
|
|
||||||
} else {
|
|
||||||
this.stringOutputField = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getOutputString(ev) {
|
|
||||||
this.condition.output = ev.target.value;
|
|
||||||
},
|
|
||||||
getOperationKey(ev) {
|
getOperationKey(ev) {
|
||||||
console.log(ev.target.value)
|
|
||||||
if (ev.target.value !== 'isUndefined' && ev.target.value !== 'isDefined') {
|
if (ev.target.value !== 'isUndefined' && ev.target.value !== 'isDefined') {
|
||||||
this.comparisonValueField = true;
|
this.comparisonValueField = true;
|
||||||
} else {
|
} else {
|
||||||
this.comparisonValueField = false;
|
this.comparisonValueField = false;
|
||||||
}
|
}
|
||||||
this.selectedOperationKey = ev.target.value;
|
this.selectedOperationKey = ev.target.value;
|
||||||
|
this.condition.definition.operator = this.selectedOperationKey;
|
||||||
|
this.persist();
|
||||||
|
//find the criterion being updated and set the operator property
|
||||||
},
|
},
|
||||||
getOperationValue(ev) {
|
getOperationValue(ev) {
|
||||||
this.selectedOperationKey = ev.target.value;
|
this.selectedOperationKey = ev.target.value;
|
||||||
|
//find the criterion being updated and set the input property
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,10 @@ export default class TelemetryCriterion extends EventEmitter {
|
|||||||
this.subscription();
|
this.subscription();
|
||||||
}
|
}
|
||||||
delete this.subscription;
|
delete this.subscription;
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
this.unsubscribe();
|
||||||
this.emitEvent('criterionRemoved');
|
this.emitEvent('criterionRemoved');
|
||||||
delete this.telemetryObjectIdAsString;
|
delete this.telemetryObjectIdAsString;
|
||||||
delete this.telemetryObject;
|
delete this.telemetryObject;
|
||||||
|
@ -119,7 +119,7 @@ describe("The telemetry criterion", function () {
|
|||||||
it("un-subscribes from telemetry providers", function () {
|
it("un-subscribes from telemetry providers", function () {
|
||||||
telemetryCriterion.subscribe();
|
telemetryCriterion.subscribe();
|
||||||
expect(telemetryCriterion.subscription).toBeDefined();
|
expect(telemetryCriterion.subscription).toBeDefined();
|
||||||
telemetryCriterion.unsubscribe();
|
telemetryCriterion.destroy();
|
||||||
expect(telemetryCriterion.subscription).toBeUndefined();
|
expect(telemetryCriterion.subscription).toBeUndefined();
|
||||||
expect(telemetryCriterion.telemetryObjectIdAsString).toBeUndefined();
|
expect(telemetryCriterion.telemetryObjectIdAsString).toBeUndefined();
|
||||||
expect(telemetryCriterion.telemetryObject).toBeUndefined();
|
expect(telemetryCriterion.telemetryObject).toBeUndefined();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user