diff options
| author | Matias Niemelä | 2013-10-17 14:29:06 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-10-23 10:30:45 -0700 |
| commit | 3f568b22f9bec09192588e3cae937db5c2e757f9 (patch) | |
| tree | 12f4bd625dab9280402051d366cbf5837a50ee23 /test/ngRoute/directive/ngViewSpec.js | |
| parent | 2623de1426219dc799f63a3d155911f93fc03461 (diff) | |
| download | angular.js-3f568b22f9bec09192588e3cae937db5c2e757f9.tar.bz2 | |
fix(ngView): ensure the new view element is placed after the old view element
Closes #4362
Diffstat (limited to 'test/ngRoute/directive/ngViewSpec.js')
| -rw-r--r-- | test/ngRoute/directive/ngViewSpec.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/ngRoute/directive/ngViewSpec.js b/test/ngRoute/directive/ngViewSpec.js index 2d74760c..bfcb0929 100644 --- a/test/ngRoute/directive/ngViewSpec.js +++ b/test/ngRoute/directive/ngViewSpec.js @@ -599,9 +599,9 @@ describe('ngView animations', function() { $location.path('/bar'); $rootScope.$digest(); - var itemA = $animate.flushNext('leave').element; + var itemA = $animate.flushNext('enter').element; expect(itemA).not.toEqual(itemB); - var itemB = $animate.flushNext('enter').element; + var itemB = $animate.flushNext('leave').element; })); it('should render ngClass on ngView', @@ -635,8 +635,8 @@ describe('ngView animations', function() { $location.path('/bar'); $rootScope.$digest(); - $animate.flushNext('leave').element; - item = $animate.flushNext('enter').element; + $animate.flushNext('enter').element; + item = $animate.flushNext('leave').element; $animate.flushNext('addClass').element; $animate.flushNext('addClass').element; @@ -679,12 +679,11 @@ describe('ngView animations', function() { $location.path('/bar'); $rootScope.$digest(); + $animate.flushNext('enter'); //ngView new $animate.flushNext('leave'); //ngView old $rootScope.$digest(); - $animate.flushNext('enter'); //ngView new - expect(n(element.text())).toEqual(''); //this is midway during the animation $animate.flushNext('enter'); //ngRepeat 3 |
