From f288b8f010468237d238acf51ea3d8108138207a Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Thu, 13 Feb 2014 14:59:25 -0500 Subject: pref($animate): group all asynchronous requests into one shared buffer --- test/ngAnimate/animateSpec.js | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index d626d60e..41115e42 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -2563,8 +2563,9 @@ describe("ngAnimate", function() { }); - it("should disable all child animations on structural animations until the post animation timeout has passed", function() { - var intercepted; + it("should disable all child animations on structural animations until the post animation" + + "timeout has passed as well as all structural animations", function() { + var intercepted, continueAnimation; module(function($animateProvider) { $animateProvider.register('.animated', function() { return { @@ -2578,7 +2579,10 @@ describe("ngAnimate", function() { function ani(type) { return function(element, className, done) { intercepted = type; - (done || className)(); + continueAnimation = function() { + continueAnimation = angular.noop; + (done || className)(); + } } } }); @@ -2595,26 +2599,45 @@ describe("ngAnimate", function() { var child2 = $compile('