Merge remote-tracking branch 'github/master' into open450b

Merge latest from master branch to reconcile conflicts
for https://github.com/nasa/openmctweb/pull/469

Conflicts:
	platform/commonUI/general/bundle.json
This commit is contained in:
Victor Woeltjen
2016-01-08 15:36:10 -08:00
28 changed files with 2939 additions and 413 deletions

View File

@@ -424,6 +424,58 @@ define(
expect(controller.selected().style).not.toEqual(oldStyle);
});
describe("on display bounds changes", function () {
var testBounds;
beforeEach(function () {
testBounds = { start: 123, end: 321 };
mockScope.domainObject = mockDomainObject;
mockScope.model = testModel;
findWatch("domainObject")(mockDomainObject);
findWatch("model.modified")(testModel.modified);
findWatch("model.composition")(mockScope.model.composition);
findOn('telemetry:display:bounds')({}, testBounds);
});
it("issues new requests", function () {
expect(mockHandle.request).toHaveBeenCalled();
});
it("requests only a single point", function () {
expect(mockHandle.request.mostRecentCall.args[0].size)
.toEqual(1);
});
describe("and after data has been received", function () {
var mockSeries,
testValue;
beforeEach(function () {
testValue = 12321;
mockSeries = jasmine.createSpyObj('series', [
'getPointCount',
'getDomainValue',
'getRangeValue'
]);
mockSeries.getPointCount.andReturn(1);
mockSeries.getRangeValue.andReturn(testValue);
// Fire the callback associated with the request
mockHandle.request.mostRecentCall.args[1](
mockHandle.getTelemetryObjects()[0],
mockSeries
);
});
it("updates displayed values", function () {
expect(controller.getElements()[0].value)
.toEqual("Formatted " + testValue);
});
});
});
it("reflects limit status", function () {
var elements;
@@ -459,6 +511,7 @@ define(
expect(elements[1].cssClass).toEqual("alarm-b");
expect(elements[2].cssClass).toEqual("alarm-c");
});
});
}
);