mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48:12 +00:00
[Plot] Update spec
Update spec for PlotController to account for usage of the throttle service, WTD-1202.
This commit is contained in:
@ -33,6 +33,7 @@ define(
|
|||||||
var mockScope,
|
var mockScope,
|
||||||
mockFormatter,
|
mockFormatter,
|
||||||
mockHandler,
|
mockHandler,
|
||||||
|
mockThrottle,
|
||||||
mockHandle,
|
mockHandle,
|
||||||
mockDomainObject,
|
mockDomainObject,
|
||||||
mockSeries,
|
mockSeries,
|
||||||
@ -56,6 +57,7 @@ define(
|
|||||||
"telemetrySubscriber",
|
"telemetrySubscriber",
|
||||||
["handle"]
|
["handle"]
|
||||||
);
|
);
|
||||||
|
mockThrottle = jasmine.createSpy("throttle");
|
||||||
mockHandle = jasmine.createSpyObj(
|
mockHandle = jasmine.createSpyObj(
|
||||||
"subscription",
|
"subscription",
|
||||||
[
|
[
|
||||||
@ -73,12 +75,18 @@ define(
|
|||||||
);
|
);
|
||||||
|
|
||||||
mockHandler.handle.andReturn(mockHandle);
|
mockHandler.handle.andReturn(mockHandle);
|
||||||
|
mockThrottle.andCallFake(function (fn) { return fn; });
|
||||||
mockHandle.getTelemetryObjects.andReturn([mockDomainObject]);
|
mockHandle.getTelemetryObjects.andReturn([mockDomainObject]);
|
||||||
mockHandle.getMetadata.andReturn([{}]);
|
mockHandle.getMetadata.andReturn([{}]);
|
||||||
mockHandle.getDomainValue.andReturn(123);
|
mockHandle.getDomainValue.andReturn(123);
|
||||||
mockHandle.getRangeValue.andReturn(42);
|
mockHandle.getRangeValue.andReturn(42);
|
||||||
|
|
||||||
controller = new PlotController(mockScope, mockFormatter, mockHandler);
|
controller = new PlotController(
|
||||||
|
mockScope,
|
||||||
|
mockFormatter,
|
||||||
|
mockHandler,
|
||||||
|
mockThrottle
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("provides plot colors", function () {
|
it("provides plot colors", function () {
|
||||||
|
Reference in New Issue
Block a user