mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 05:38:12 +00:00
[Telemetry] Update plot specs
Update plot specs to reflect refactoring out of formatter for telemetry values, WTD-599.
This commit is contained in:
47
platform/features/plot/test/SubPlotFactorySpec.js
Normal file
47
platform/features/plot/test/SubPlotFactorySpec.js
Normal file
@ -0,0 +1,47 @@
|
||||
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
||||
|
||||
/**
|
||||
* MergeModelsSpec. Created by vwoeltje on 11/6/14.
|
||||
*/
|
||||
define(
|
||||
["../src/SubPlotFactory"],
|
||||
function (SubPlotFactory) {
|
||||
"use strict";
|
||||
|
||||
describe("The sub-plot factory", function () {
|
||||
var mockDomainObject,
|
||||
mockPanZoomStack,
|
||||
mockFormatter,
|
||||
factory;
|
||||
|
||||
beforeEach(function () {
|
||||
mockDomainObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
[ "getId", "getModel", "getCapability" ]
|
||||
);
|
||||
mockPanZoomStack = jasmine.createSpyObj(
|
||||
"panZoomStack",
|
||||
[ "getPanZoom" ]
|
||||
);
|
||||
mockFormatter = jasmine.createSpyObj(
|
||||
"formatter",
|
||||
[ "formatDomainValue", "formatRangeValue" ]
|
||||
);
|
||||
|
||||
mockPanZoomStack.getPanZoom.andReturn({
|
||||
origin: [ 0, 0 ],
|
||||
dimensions: [ 100, 100 ]
|
||||
});
|
||||
|
||||
factory = new SubPlotFactory(mockFormatter);
|
||||
});
|
||||
|
||||
it("creates sub-plots", function () {
|
||||
expect(factory.createSubPlot(
|
||||
[mockDomainObject],
|
||||
mockPanZoomStack
|
||||
).getTelemetryObjects()).toEqual([mockDomainObject]);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user