mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 13:18:15 +00:00
[Time Conductor] Test updated fixed position behavior
Verify interactions from FixedControllers on events issued by the time conductor.
This commit is contained in:
@ -423,6 +423,59 @@ define(
|
|||||||
// Style should have been updated
|
// Style should have been updated
|
||||||
expect(controller.selected().style).not.toEqual(oldStyle);
|
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user