[Telemetry] Update plot specs

Update plot specs to reflect refactoring out of formatter
for telemetry values, WTD-599.
This commit is contained in:
Victor Woeltjen
2014-12-24 12:13:57 -08:00
parent f63038a83f
commit 78b636dafe
10 changed files with 184 additions and 36 deletions

View File

@@ -9,18 +9,23 @@ define(
"use strict";
describe("Plot mode options", function () {
var mockDomainObject;
var mockDomainObject,
mockSubPlotFactory;
beforeEach(function () {
mockDomainObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getModel", "getCapability" ]
);
mockSubPlotFactory = jasmine.createSpyObj(
"subPlotFactory",
[ "createSubPlot" ]
);
});
it("offers only one option when one object is present", function () {
expect(
new PlotModeOptions([mockDomainObject])
new PlotModeOptions([mockDomainObject], mockSubPlotFactory)
.getModeOptions().length
).toEqual(1);
});
@@ -33,7 +38,7 @@ define(
mockDomainObject
];
expect(
new PlotModeOptions(objects)
new PlotModeOptions(objects, mockSubPlotFactory)
.getModeOptions().length
).toEqual(2);
});
@@ -44,7 +49,7 @@ define(
mockDomainObject,
mockDomainObject,
mockDomainObject
]),
], mockSubPlotFactory),
initialHandler = plotModeOptions.getModeHandler();
// Change the mode