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