openmct/platform/features/plot/test/SubPlotFactorySpec.js
Victor Woeltjen 78b636dafe [Telemetry] Update plot specs
Update plot specs to reflect refactoring out of formatter
for telemetry values, WTD-599.
2014-12-24 12:17:05 -08:00

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]);
});
});
}
);