mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Add tests
This commit is contained in:
parent
3d900ecf18
commit
77314c60d6
2 changed files with 16 additions and 1 deletions
|
@ -137,7 +137,7 @@ define(function (require) {
|
|||
};
|
||||
|
||||
$scope.setRefreshInterval = function (interval) {
|
||||
interval.pause = false;
|
||||
interval.pause = interval.pause == null ? false : true;
|
||||
$scope.interval = interval;
|
||||
};
|
||||
|
||||
|
|
|
@ -111,6 +111,21 @@ define(function (require) {
|
|||
done();
|
||||
});
|
||||
|
||||
it('should disable the looper when paused', function (done) {
|
||||
$scope.setRefreshInterval({ value : 1000, pause: true});
|
||||
$elem.scope().$digest();
|
||||
expect($courier.searchLooper.loopInterval()).to.be(0);
|
||||
expect($scope.interval.value).to.be(1000);
|
||||
done();
|
||||
});
|
||||
|
||||
it('but keep interval.value set', function (done) {
|
||||
$scope.setRefreshInterval({ value : 1000, pause: true});
|
||||
$elem.scope().$digest();
|
||||
expect($scope.interval.value).to.be(1000);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should highlight the current active interval', function (done) {
|
||||
$scope.setRefreshInterval({ value: 300000 });
|
||||
$elem.scope().$digest();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue