mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Timeline] Update zoom controller spec
...to reflect changes/simplifications for #936.
This commit is contained in:
parent
99590d18f7
commit
23b64951f3
@ -38,6 +38,7 @@ define(
|
||||
};
|
||||
mockScope = jasmine.createSpyObj("$scope", ['$watch']);
|
||||
mockScope.commit = jasmine.createSpy('commit');
|
||||
mockScope.scroll = { x: 0, width: 1000 };
|
||||
mockTimeout = jasmine.createSpy('$timeout');
|
||||
controller = new TimelineZoomController(
|
||||
mockScope,
|
||||
@ -67,11 +68,6 @@ define(
|
||||
expect(controller.zoom()).toEqual(3500);
|
||||
});
|
||||
|
||||
it("observes scroll bounds", function () {
|
||||
expect(mockScope.$watch)
|
||||
.toHaveBeenCalledWith("scroll", jasmine.any(Function));
|
||||
});
|
||||
|
||||
describe("when watches have fired", function () {
|
||||
var mockDomainObject,
|
||||
mockPromise,
|
||||
@ -112,6 +108,10 @@ define(
|
||||
mockScope.$watch.calls.forEach(function (call) {
|
||||
call.args[1](mockScope[call.args[0]]);
|
||||
});
|
||||
|
||||
mockTimeout.calls.forEach(function (call) {
|
||||
call.args[0]();
|
||||
});
|
||||
});
|
||||
|
||||
it("zooms to fit the timeline", function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user