mirror of
https://github.com/nasa/openmct.git
synced 2025-06-04 00:20:50 +00:00
[Plot] Initial spec for PlotController
Add initial spec for PlotController, the main controller to support the plot view. WTD-533.
This commit is contained in:
parent
e1298db760
commit
c9300e8611
@ -84,10 +84,8 @@ define(
|
|||||||
tickGenerator.generateRangeTicks(RANGE_TICKS);
|
tickGenerator.generateRangeTicks(RANGE_TICKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
function plotTelemetry() {
|
function plotTelemetry(telemetry) {
|
||||||
var telemetry, prepared, data;
|
var prepared, data;
|
||||||
|
|
||||||
telemetry = $scope.telemetry;
|
|
||||||
|
|
||||||
if (!telemetry) {
|
if (!telemetry) {
|
||||||
return;
|
return;
|
||||||
|
33
platform/features/plot/test/PlotControllerSpec.js
Normal file
33
platform/features/plot/test/PlotControllerSpec.js
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MergeModelsSpec. Created by vwoeltje on 11/6/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
["../src/PlotController"],
|
||||||
|
function (PlotController) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
describe("The plot controller", function () {
|
||||||
|
var mockScope,
|
||||||
|
controller;
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
mockScope = jasmine.createSpyObj(
|
||||||
|
"$scope",
|
||||||
|
[ "$watch", "$on" ]
|
||||||
|
);
|
||||||
|
controller = new PlotController(mockScope);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("listens for telemetry updates", function () {
|
||||||
|
expect(mockScope.$on).toHaveBeenCalledWith(
|
||||||
|
"telemetryUpdate",
|
||||||
|
jasmine.any(Function)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
4
platform/features/plot/test/suite.json
Normal file
4
platform/features/plot/test/suite.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[
|
||||||
|
"PlotController"
|
||||||
|
]
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user