diff options
| -rw-r--r-- | src/ngMock/angular-mocks.js | 2 | ||||
| -rw-r--r-- | test/ng/directive/ngClassSpec.js | 12 | ||||
| -rwxr-xr-x | test/ng/directive/ngIfSpec.js | 6 | ||||
| -rw-r--r-- | test/ng/directive/ngIncludeSpec.js | 12 | ||||
| -rw-r--r-- | test/ng/directive/ngRepeatSpec.js | 24 | ||||
| -rw-r--r-- | test/ng/directive/ngShowHideSpec.js | 8 | ||||
| -rw-r--r-- | test/ng/directive/ngSwitchSpec.js | 8 | ||||
| -rw-r--r-- | test/ngRoute/directive/ngViewSpec.js | 26 | 
8 files changed, 49 insertions, 49 deletions
| diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index e016bc32..756fd224 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -664,7 +664,7 @@ angular.mock.animate = angular.module('mock.animate', ['ng'])        var animate = {          queue : [],          enabled : $delegate.enabled, -        process : function(name) { +        flushNext : function(name) {            var tick = animate.queue.shift();            expect(tick.method).toBe(name);            tick.fn(); diff --git a/test/ng/directive/ngClassSpec.js b/test/ng/directive/ngClassSpec.js index b038c971..54dee142 100644 --- a/test/ng/directive/ngClassSpec.js +++ b/test/ng/directive/ngClassSpec.js @@ -322,27 +322,27 @@ describe('ngClass animations', function() {      $rootScope.val = 'one';      $rootScope.$digest(); -    $animate.process('addClass'); -    $animate.process('addClass'); +    $animate.flushNext('addClass'); +    $animate.flushNext('addClass');      $timeout.flush();      expect($animate.queue.length).toBe(0);      $rootScope.val = '';      $rootScope.$digest(); -    $animate.process('removeClass'); //only removeClass is called +    $animate.flushNext('removeClass'); //only removeClass is called      expect($animate.queue.length).toBe(0);      $timeout.flush();      $rootScope.val = 'one';      $rootScope.$digest(); -    $animate.process('addClass'); +    $animate.flushNext('addClass');      $timeout.flush();      expect($animate.queue.length).toBe(0);      $rootScope.val = 'two';      $rootScope.$digest(); -    $animate.process('removeClass'); -    $animate.process('addClass'); +    $animate.flushNext('removeClass'); +    $animate.flushNext('addClass');      $timeout.flush();      expect($animate.queue.length).toBe(0);    })); diff --git a/test/ng/directive/ngIfSpec.js b/test/ng/directive/ngIfSpec.js index 8f2cb793..79eab6bb 100755 --- a/test/ng/directive/ngIfSpec.js +++ b/test/ng/directive/ngIfSpec.js @@ -119,7 +119,7 @@ describe('ngIf animations', function () {        $rootScope.$digest();        $scope.$apply('value = true'); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('Hi');        expect(element.children().length).toBe(1); @@ -136,13 +136,13 @@ describe('ngIf animations', function () {        ))($scope);        $scope.$apply('value = true'); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('Hi');        $scope.$apply('value = false');        expect(element.children().length).toBe(1); -      item = $animate.process('leave').element; +      item = $animate.flushNext('leave').element;        expect(item.text()).toBe('Hi');        expect(element.children().length).toBe(0); diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js index c55fb0b3..f1bfbba2 100644 --- a/test/ng/directive/ngIncludeSpec.js +++ b/test/ng/directive/ngIncludeSpec.js @@ -388,7 +388,7 @@ describe('ngInclude animations', function() {        ))($rootScope);        $rootScope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('data');    })); @@ -404,13 +404,13 @@ describe('ngInclude animations', function() {        ))($rootScope);        $rootScope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('data');        $rootScope.tpl = '';        $rootScope.$digest(); -      item = $animate.process('leave').element; +      item = $animate.flushNext('leave').element;        expect(item.text()).toBe('data');    })); @@ -427,14 +427,14 @@ describe('ngInclude animations', function() {        ))($rootScope);        $rootScope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('one');        $rootScope.tpl = 'two';        $rootScope.$digest(); -      var itemA = $animate.process('leave').element; -      var itemB = $animate.process('enter').element; +      var itemA = $animate.flushNext('leave').element; +      var itemB = $animate.flushNext('enter').element;        expect(itemA.attr('ng-include')).toBe('tpl');        expect(itemB.attr('ng-include')).toBe('tpl');        expect(itemA).not.toEqual(itemB); diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index 9dfaa404..35b9f897 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -907,13 +907,13 @@ describe('ngRepeat animations', function() {      $rootScope.items = ['1','2','3'];      $rootScope.$digest(); -    item = $animate.process('enter').element; +    item = $animate.flushNext('enter').element;      expect(item.text()).toBe('1'); -    item = $animate.process('enter').element; +    item = $animate.flushNext('enter').element;      expect(item.text()).toBe('2'); -    item = $animate.process('enter').element; +    item = $animate.flushNext('enter').element;      expect(item.text()).toBe('3');    })); @@ -932,19 +932,19 @@ describe('ngRepeat animations', function() {      $rootScope.items = ['1','2','3'];      $rootScope.$digest(); -    item = $animate.process('enter').element; +    item = $animate.flushNext('enter').element;      expect(item.text()).toBe('1'); -    item = $animate.process('enter').element; +    item = $animate.flushNext('enter').element;      expect(item.text()).toBe('2'); -    item = $animate.process('enter').element; +    item = $animate.flushNext('enter').element;      expect(item.text()).toBe('3');      $rootScope.items = ['1','3'];      $rootScope.$digest(); -    item = $animate.process('leave').element; +    item = $animate.flushNext('leave').element;      expect(item.text()).toBe('2');    })); @@ -964,22 +964,22 @@ describe('ngRepeat animations', function() {        $rootScope.items = ['1','2','3'];        $rootScope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('1'); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('2'); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('3');        $rootScope.items = ['2','3','1'];        $rootScope.$digest(); -      item = $animate.process('move').element; +      item = $animate.flushNext('move').element;        expect(item.text()).toBe('2'); -      item = $animate.process('move').element; +      item = $animate.flushNext('move').element;        expect(item.text()).toBe('1');    })); diff --git a/test/ng/directive/ngShowHideSpec.js b/test/ng/directive/ngShowHideSpec.js index be0a3895..4a8e55da 100644 --- a/test/ng/directive/ngShowHideSpec.js +++ b/test/ng/directive/ngShowHideSpec.js @@ -81,14 +81,14 @@ describe('ngShow / ngHide animations', function() {        ))($scope);        $scope.$digest(); -      item = $animate.process('removeClass').element; +      item = $animate.flushNext('removeClass').element;        expect(item.text()).toBe('data');        expect(item).toBeShown();        $scope.on = false;        $scope.$digest(); -      item = $animate.process('addClass').element; +      item = $animate.flushNext('addClass').element;        expect(item.text()).toBe('data');        expect(item).toBeHidden();      })); @@ -104,14 +104,14 @@ describe('ngShow / ngHide animations', function() {        ))($scope);        $scope.$digest(); -      item = $animate.process('addClass').element; +      item = $animate.flushNext('addClass').element;        expect(item.text()).toBe('datum');        expect(item).toBeHidden();        $scope.off = false;        $scope.$digest(); -      item = $animate.process('removeClass').element; +      item = $animate.flushNext('removeClass').element;        expect(item.text()).toBe('datum');        expect(item).toBeShown();      })); diff --git a/test/ng/directive/ngSwitchSpec.js b/test/ng/directive/ngSwitchSpec.js index 8750b187..e4cd483c 100644 --- a/test/ng/directive/ngSwitchSpec.js +++ b/test/ng/directive/ngSwitchSpec.js @@ -255,7 +255,7 @@ describe('ngSwitch animations', function() {        $scope.val = 'one';        $scope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('one');    })); @@ -276,16 +276,16 @@ describe('ngSwitch animations', function() {        $scope.val = 'two';        $scope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('two');        $scope.val = 'three';        $scope.$digest(); -      item = $animate.process('leave').element; +      item = $animate.flushNext('leave').element;        expect(item.text()).toBe('two'); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('three');    })); diff --git a/test/ngRoute/directive/ngViewSpec.js b/test/ngRoute/directive/ngViewSpec.js index 04f5ba89..690243e7 100644 --- a/test/ngRoute/directive/ngViewSpec.js +++ b/test/ngRoute/directive/ngViewSpec.js @@ -556,7 +556,7 @@ describe('ngView animations', function() {            $location.path('/foo');            $rootScope.$digest(); -          var item = $animate.process('enter').element; +          var item = $animate.flushNext('enter').element;            expect(item.text()).toBe('data');          })); @@ -570,13 +570,13 @@ describe('ngView animations', function() {        $location.path('/foo');        $rootScope.$digest(); -      item = $animate.process('enter').element; +      item = $animate.flushNext('enter').element;        expect(item.text()).toBe('foo');        $location.path('/');        $rootScope.$digest(); -      item = $animate.process('leave').element; +      item = $animate.flushNext('leave').element;        expect(item.text()).toBe('foo');      })); @@ -590,15 +590,15 @@ describe('ngView animations', function() {          $location.path('/foo');          $rootScope.$digest(); -        item = $animate.process('enter').element; +        item = $animate.flushNext('enter').element;          expect(item.text()).toBe('data');          $location.path('/bar');          $rootScope.$digest(); -        var itemA = $animate.process('leave').element; +        var itemA = $animate.flushNext('leave').element;          expect(itemA).not.toEqual(itemB); -        var itemB = $animate.process('enter').element; +        var itemB = $animate.flushNext('enter').element;      }));    }); @@ -627,12 +627,12 @@ describe('ngView animations', function() {        $location.path('/foo');        $rootScope.$digest(); -      $animate.process('enter'); //ngView +      $animate.flushNext('enter'); //ngView        $timeout.flush(); -      $animate.process('enter'); //repeat 1 -      $animate.process('enter'); //repeat 2 +      $animate.flushNext('enter'); //repeat 1 +      $animate.flushNext('enter'); //repeat 2        $timeout.flush(); @@ -641,16 +641,16 @@ describe('ngView animations', function() {        $location.path('/bar');        $rootScope.$digest(); -      $animate.process('leave'); //ngView old +      $animate.flushNext('leave'); //ngView old        $timeout.flush(); -      $animate.process('enter'); //ngView new +      $animate.flushNext('enter'); //ngView new        $timeout.flush();        expect(n(element.text())).toEqual(''); //this is midway during the animation -      $animate.process('enter'); //ngRepeat 3 -      $animate.process('enter'); //ngRepeat 4 +      $animate.flushNext('enter'); //ngRepeat 3 +      $animate.flushNext('enter'); //ngRepeat 4        $timeout.flush(); | 
