mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 09:58:52 +00:00
78b636dafe
Update plot specs to reflect refactoring out of formatter for telemetry values, WTD-599.
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
/*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]);
|
|
});
|
|
});
|
|
}
|
|
); |