mirror of
https://github.com/nasa/openmct.git
synced 2025-06-23 01:18:57 +00:00
[Telemetry] Update specs
Update specs to reflect changes for WTD-1329.
This commit is contained in:
@ -191,7 +191,8 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addMutationListener() {
|
function addMutationListener() {
|
||||||
var mutation = domainObject.getCapability('mutation');
|
var mutation = domainObject &&
|
||||||
|
domainObject.getCapability('mutation');
|
||||||
if (mutation) {
|
if (mutation) {
|
||||||
return mutation.listen(modelChange);
|
return mutation.listen(modelChange);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ define(
|
|||||||
mockDomainObject,
|
mockDomainObject,
|
||||||
mockCallback,
|
mockCallback,
|
||||||
mockTelemetry,
|
mockTelemetry,
|
||||||
|
mockMutation,
|
||||||
mockUnsubscribe,
|
mockUnsubscribe,
|
||||||
mockSeries,
|
mockSeries,
|
||||||
testMetadata,
|
testMetadata,
|
||||||
@ -59,6 +60,10 @@ define(
|
|||||||
"telemetry",
|
"telemetry",
|
||||||
["subscribe", "getMetadata"]
|
["subscribe", "getMetadata"]
|
||||||
);
|
);
|
||||||
|
mockMutation = jasmine.createSpyObj(
|
||||||
|
"mutation",
|
||||||
|
["mutate", "listen"]
|
||||||
|
);
|
||||||
mockUnsubscribe = jasmine.createSpy("unsubscribe");
|
mockUnsubscribe = jasmine.createSpy("unsubscribe");
|
||||||
mockSeries = jasmine.createSpyObj(
|
mockSeries = jasmine.createSpyObj(
|
||||||
"series",
|
"series",
|
||||||
@ -68,7 +73,12 @@ define(
|
|||||||
mockQ.when.andCallFake(mockPromise);
|
mockQ.when.andCallFake(mockPromise);
|
||||||
|
|
||||||
mockDomainObject.hasCapability.andReturn(true);
|
mockDomainObject.hasCapability.andReturn(true);
|
||||||
mockDomainObject.getCapability.andReturn(mockTelemetry);
|
mockDomainObject.getCapability.andCallFake(function (c) {
|
||||||
|
return {
|
||||||
|
telemetry: mockTelemetry,
|
||||||
|
mutation: mockMutation
|
||||||
|
}[c];
|
||||||
|
});
|
||||||
mockDomainObject.getId.andReturn('test-id');
|
mockDomainObject.getId.andReturn('test-id');
|
||||||
|
|
||||||
mockTelemetry.subscribe.andReturn(mockUnsubscribe);
|
mockTelemetry.subscribe.andReturn(mockUnsubscribe);
|
||||||
|
Reference in New Issue
Block a user