chore(ngAnimate): CSS classes X-setup/X-start -> X/X-active

BREAKING CHANGE: css classes foo-setup/foo-start become foo/foo-active

The CSS transition classes have changed suffixes. To migrate rename
.foo-setup {...} to .foo {...}
.foo-start {...} to .foo-active {...}

or for type: enter, leave, move, show, hide

.foo-type-setup {...} to .foo-type {...}
.foo-type-start {...} to .foo-type-active {...}
This commit is contained in:
Matias Niemelä 2013-05-07 17:11:39 -04:00 committed by Misko Hevery
parent 14757874a7
commit 11f712bc3e
14 changed files with 127 additions and 128 deletions

View file

@ -1,4 +1,4 @@
.reveal-setup {
.reveal {
-webkit-transition:1s linear all;
-moz-transition:1s linear all;
-o-transition:1s linear all;
@ -6,7 +6,7 @@
opacity:0;
}
.reveal-setup.reveal-start {
.reveal.reveal-active {
opacity:1;
}
@ -15,7 +15,7 @@
overflow:hidden;
}
.slide-reveal-setup {
.slide-reveal {
-webkit-transition:0.5s linear all;
-moz-transition:0.5s linear all;
-o-transition:0.5s linear all;
@ -26,12 +26,12 @@
opacity:0;
top:10px;
}
.slide-reveal-setup.slide-reveal-start {
.slide-reveal.slide-reveal-active {
top:0;
opacity:1;
}
.expand-enter-setup {
.expand-enter {
-webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all;
-moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all;
-o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all;
@ -41,13 +41,13 @@
line-height:0;
height:0!important;
}
.expand-enter-setup.expand-enter-start {
.expand-enter.expand-enter-active {
opacity:1;
line-height:20px;
height:20px!important;
}
.expand-leave-setup {
.expand-leave {
-webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all;
-moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all;
-o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all;
@ -56,7 +56,7 @@
opacity:1;
height:20px;
}
.expand-leave-setup.expand-leave-start {
.expand-leave.expand-leave-active {
opacity:0;
height:0;
}

View file

@ -58,7 +58,7 @@
* The animate-enter CSS class is the event name that you
* have provided within the ngAnimate attribute.
* */
* .animate-enter-setup {
* .animate-enter {
* -webkit-transition: 1s linear all; /* Safari/Chrome */
* -moz-transition: 1s linear all; /* Firefox */
* -ms-transition: 1s linear all; /* IE10 */
@ -74,7 +74,7 @@
* classes together to avoid any CSS-specificity
* conflicts
* */
* .animate-enter-setup.animate-enter-start {
* .animate-enter.animate-enter-active {
* /* The animation code itself */
* opacity: 1;
* }
@ -87,7 +87,7 @@
*
* <pre>
* <style type="text/css">
* .animate-enter-setup {
* .animate-enter {
* -webkit-animation: enter_sequence 1s linear;
* -moz-animation: enter_sequence 1s linear;
* -o-animation: enter_sequence 1s linear;
@ -116,8 +116,8 @@
*
* ngAnimate will first examine any CSS animation code and then fallback to using CSS transitions.
*
* Upon DOM mutation, the setup class is added first, then the browser is allowed to reflow the content and then,
* the start class is added to trigger the animation. The ngAnimate directive will automatically extract the duration
* Upon DOM mutation, the event class is added first, then the browser is allowed to reflow the content and then,
* the active class is added to trigger the animation. The ngAnimate directive will automatically extract the duration
* of the animation to determine when the animation ends. Once the animation is over then both CSS classes will be
* removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end
* immediately resulting in a DOM element that is at it's final state. This final state is when the DOM element
@ -270,8 +270,7 @@ var $AnimatorProvider = function() {
beforeFn(element, parent, after);
afterFn(element, parent, after);
} else {
var setupClass = className + '-setup';
var startClass = className + '-start';
var activeClassName = className + '-active';
if (!parent) {
parent = after ? after.parent() : element.parent();
@ -284,7 +283,7 @@ var $AnimatorProvider = function() {
}
element.data(NG_ANIMATE_CONTROLLER, {running:true});
element.addClass(setupClass);
element.addClass(className);
beforeFn(element, parent, after);
if (element.length == 0) return done();
@ -304,7 +303,7 @@ var $AnimatorProvider = function() {
};
function beginAnimation() {
element.addClass(startClass);
element.addClass(activeClassName);
if (polyfillStart) {
polyfillStart(element, done, memento);
} else if (isFunction($window.getComputedStyle)) {
@ -357,8 +356,8 @@ var $AnimatorProvider = function() {
function done() {
afterFn(element, parent, after);
element.removeClass(setupClass);
element.removeClass(startClass);
element.removeClass(className);
element.removeClass(activeClassName);
element.removeData(NG_ANIMATE_CONTROLLER);
}
}

View file

@ -61,8 +61,8 @@
<div>Content of template2.html</div>
</file>
<file name="animations.css">
.example-leave-setup,
.example-enter-setup {
.example-leave,
.example-enter {
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-ms-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
@ -81,17 +81,17 @@
padding:10px;
}
.example-enter-setup {
.example-enter {
top:-50px;
}
.example-enter-setup.example-enter-start {
.example-enter.example-enter-active {
top:0;
}
.example-leave-setup {
.example-leave {
top:0;
}
.example-leave-setup.example-leave-start {
.example-leave.example-leave-active {
top:50px;
}
</file>

View file

@ -88,9 +88,9 @@
</div>
</file>
<file name="animations.css">
.example-repeat-enter-setup,
.example-repeat-leave-setup,
.example-repeat-move-setup {
.example-repeat-enter,
.example-repeat-leave,
.example-repeat-move {
-webkit-transition:all linear 0.5s;
-moz-transition:all linear 0.5s;
-ms-transition:all linear 0.5s;
@ -98,26 +98,26 @@
transition:all linear 0.5s;
}
.example-repeat-enter-setup {
.example-repeat-enter {
line-height:0;
opacity:0;
}
.example-repeat-enter-setup.example-repeat-enter-start {
.example-repeat-enter.example-repeat-enter-active {
line-height:20px;
opacity:1;
}
.example-repeat-leave-setup {
.example-repeat-leave {
opacity:1;
line-height:20px;
}
.example-repeat-leave-setup.example-repeat-leave-start {
.example-repeat-leave.example-repeat-leave-active {
opacity:0;
line-height:0;
}
.example-repeat-move-setup { }
.example-repeat-move-setup.example-repeat-move-start { }
.example-repeat-move { }
.example-repeat-move.example-repeat-move-active { }
</file>
<file name="scenario.js">
it('should render initial data set', function() {

View file

@ -45,7 +45,7 @@
</div>
</file>
<file name="animations.css">
.example-show-setup, .example-hide-setup {
.example-show, .example-hide {
-webkit-transition:all linear 0.5s;
-moz-transition:all linear 0.5s;
-ms-transition:all linear 0.5s;
@ -53,12 +53,12 @@
transition:all linear 0.5s;
}
.example-show-setup {
.example-show {
line-height:0;
opacity:0;
padding:0 10px;
}
.example-show-start.example-show-start {
.example-show-active.example-show-active {
line-height:20px;
opacity:1;
padding:10px;
@ -66,14 +66,14 @@
background:white;
}
.example-hide-setup {
.example-hide {
line-height:20px;
opacity:1;
padding:10px;
border:1px solid black;
background:white;
}
.example-hide-start.example-hide-start {
.example-hide-active.example-hide-active {
line-height:0;
opacity:0;
padding:0 10px;
@ -154,7 +154,7 @@ var ngShowDirective = ['$animator', function($animator) {
</div>
</file>
<file name="animations.css">
.example-show-setup, .example-hide-setup {
.example-show, .example-hide {
-webkit-transition:all linear 0.5s;
-moz-transition:all linear 0.5s;
-ms-transition:all linear 0.5s;
@ -162,12 +162,12 @@ var ngShowDirective = ['$animator', function($animator) {
transition:all linear 0.5s;
}
.example-show-setup {
.example-show {
line-height:0;
opacity:0;
padding:0 10px;
}
.example-show-start.example-show-start {
.example-show.example-show-active {
line-height:20px;
opacity:1;
padding:10px;
@ -175,14 +175,14 @@ var ngShowDirective = ['$animator', function($animator) {
background:white;
}
.example-hide-setup {
.example-hide {
line-height:20px;
opacity:1;
padding:10px;
border:1px solid black;
background:white;
}
.example-hide-start.example-hide-start {
.example-hide.example-hide-active {
line-height:0;
opacity:0;
padding:0 10px;

View file

@ -71,7 +71,7 @@
}
</file>
<file name="animations.css">
.example-leave-setup, .example-enter-setup {
.example-leave, .example-enter {
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-ms-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
@ -90,17 +90,17 @@
padding:10px;
}
.example-enter-setup {
.example-enter {
top:-50px;
}
.example-enter-start.example-enter-start {
.example-enter.example-enter-active {
top:0;
}
.example-leave-setup {
.example-leave {
top:0;
}
.example-leave-start.example-leave-start {
.example-leave.example-leave-active {
top:50px;
}
</file>

View file

@ -61,7 +61,7 @@
</file>
<file name="animations.css">
.example-leave-setup, .example-enter-setup {
.example-leave, .example-enter {
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
-moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
-ms-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
@ -87,15 +87,15 @@
padding:10px;
}
.example-enter-setup {
.example-enter {
left:100%;
}
.example-enter-setup.example-enter-start {
.example-enter.example-enter-active {
left:0;
}
.example-leave-setup { }
.example-leave-setup.example-leave-start {
.example-leave { }
.example-leave.example-leave-active {
left:-100%;
}
</file>

View file

@ -225,38 +225,38 @@ describe("$animator", function() {
//enter
animator.enter(child, element);
expect(child.attr('class')).toContain('custom-enter-setup');
expect(child.attr('class')).toContain('custom-enter');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-enter-start');
expect(child.attr('class')).toContain('custom-enter-active');
window.setTimeout.expect(0).process();
//leave
element.append(after);
animator.move(child, element, after);
expect(child.attr('class')).toContain('custom-move-setup');
expect(child.attr('class')).toContain('custom-move');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-move-start');
expect(child.attr('class')).toContain('custom-move-active');
window.setTimeout.expect(0).process();
//hide
animator.hide(child);
expect(child.attr('class')).toContain('custom-hide-setup');
expect(child.attr('class')).toContain('custom-hide');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-hide-start');
expect(child.attr('class')).toContain('custom-hide-active');
window.setTimeout.expect(0).process();
//show
animator.show(child);
expect(child.attr('class')).toContain('custom-show-setup');
expect(child.attr('class')).toContain('custom-show');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-show-start');
expect(child.attr('class')).toContain('custom-show-active');
window.setTimeout.expect(0).process();
//leave
animator.leave(child);
expect(child.attr('class')).toContain('custom-leave-setup');
expect(child.attr('class')).toContain('custom-leave');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-leave-start');
expect(child.attr('class')).toContain('custom-leave-active');
window.setTimeout.expect(0).process();
}));

View file

@ -121,16 +121,16 @@ describe('ngIf ngAnimate', function () {
var first = element.children()[0];
if ($sniffer.transitions) {
expect(first.className).toContain('custom-enter-setup');
expect(first.className).toContain('custom-enter');
window.setTimeout.expect(1).process();
expect(first.className).toContain('custom-enter-start');
expect(first.className).toContain('custom-enter-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(first.className).not.toContain('custom-enter-setup');
expect(first.className).not.toContain('custom-enter-start');
expect(first.className).not.toContain('custom-enter');
expect(first.className).not.toContain('custom-enter-active');
}));
it('should fire off the leave animation + add and remove the css classes',
@ -158,9 +158,9 @@ describe('ngIf ngAnimate', function () {
expect(element.children().length).toBe($sniffer.transitions ? 1 : 0);
if ($sniffer.transitions) {
expect(first.className).toContain('custom-leave-setup');
expect(first.className).toContain('custom-leave');
window.setTimeout.expect(1).process();
expect(first.className).toContain('custom-leave-start');
expect(first.className).toContain('custom-leave-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);

View file

@ -352,17 +352,17 @@ describe('ngInclude ngAnimate', function() {
applyCSS(child, 'transition', '1s linear all');
if ($sniffer.transitions) {
expect(child.attr('class')).toContain('custom-enter-setup');
expect(child.attr('class')).toContain('custom-enter');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-enter-start');
expect(child.attr('class')).toContain('custom-enter-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(child.attr('class')).not.toContain('custom-enter-setup');
expect(child.attr('class')).not.toContain('custom-enter-start');
expect(child.attr('class')).not.toContain('custom-enter');
expect(child.attr('class')).not.toContain('custom-enter-active');
}));
it('should fire off the leave animation + add and remove the css classes',
@ -385,17 +385,17 @@ describe('ngInclude ngAnimate', function() {
$rootScope.$digest();
if ($sniffer.transitions) {
expect(child.attr('class')).toContain('custom-leave-setup');
expect(child.attr('class')).toContain('custom-leave');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-leave-start');
expect(child.attr('class')).toContain('custom-leave-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(child.attr('class')).not.toContain('custom-leave-setup');
expect(child.attr('class')).not.toContain('custom-leave-start');
expect(child.attr('class')).not.toContain('custom-leave');
expect(child.attr('class')).not.toContain('custom-leave-active');
}));
it('should catch and use the correct duration for animation',

View file

@ -610,12 +610,12 @@ describe('ngRepeat ngAnimate', function() {
if ($sniffer.transitions) {
angular.forEach(kids, function(kid) {
expect(kid.attr('class')).toContain('custom-enter-setup');
expect(kid.attr('class')).toContain('custom-enter');
window.setTimeout.expect(1).process();
});
angular.forEach(kids, function(kid) {
expect(kid.attr('class')).toContain('custom-enter-start');
expect(kid.attr('class')).toContain('custom-enter-active');
window.setTimeout.expect(1000).process();
});
} else {
@ -623,8 +623,8 @@ describe('ngRepeat ngAnimate', function() {
}
angular.forEach(kids, function(kid) {
expect(kid.attr('class')).not.toContain('custom-enter-setup');
expect(kid.attr('class')).not.toContain('custom-enter-start');
expect(kid.attr('class')).not.toContain('custom-enter');
expect(kid.attr('class')).not.toContain('custom-enter-active');
});
}));
@ -655,16 +655,16 @@ describe('ngRepeat ngAnimate', function() {
//the last element gets pushed down when it animates
var kid = jqLite(element.children()[1]);
if ($sniffer.transitions) {
expect(kid.attr('class')).toContain('custom-leave-setup');
expect(kid.attr('class')).toContain('custom-leave');
window.setTimeout.expect(1).process();
expect(kid.attr('class')).toContain('custom-leave-start');
expect(kid.attr('class')).toContain('custom-leave-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(kid.attr('class')).not.toContain('custom-leave-setup');
expect(kid.attr('class')).not.toContain('custom-leave-start');
expect(kid.attr('class')).not.toContain('custom-leave');
expect(kid.attr('class')).not.toContain('custom-leave-active');
}));
it('should fire off the move animation + add and remove the css classes',
@ -697,25 +697,25 @@ describe('ngRepeat ngAnimate', function() {
var right = jqLite(kids[2]);
if ($sniffer.transitions) {
expect(first.attr('class')).toContain('custom-move-setup');
expect(first.attr('class')).toContain('custom-move');
window.setTimeout.expect(1).process();
expect(left.attr('class')).toContain('custom-move-setup');
expect(left.attr('class')).toContain('custom-move');
window.setTimeout.expect(1).process();
expect(first.attr('class')).toContain('custom-move-start');
expect(first.attr('class')).toContain('custom-move-active');
window.setTimeout.expect(1000).process();
expect(left.attr('class')).toContain('custom-move-start');
expect(left.attr('class')).toContain('custom-move-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(first.attr('class')).not.toContain('custom-move-setup');
expect(first.attr('class')).not.toContain('custom-move-start');
expect(left.attr('class')).not.toContain('custom-move-setup');
expect(left.attr('class')).not.toContain('custom-move-start');
expect(right.attr('class')).not.toContain('custom-move-setup');
expect(right.attr('class')).not.toContain('custom-move-start');
expect(first.attr('class')).not.toContain('custom-move');
expect(first.attr('class')).not.toContain('custom-move-active');
expect(left.attr('class')).not.toContain('custom-move');
expect(left.attr('class')).not.toContain('custom-move-active');
expect(right.attr('class')).not.toContain('custom-move');
expect(right.attr('class')).not.toContain('custom-move-active');
}));
it('should catch and use the correct duration for animation',

View file

@ -88,31 +88,31 @@ describe('ngShow / ngHide - ngAnimate', function() {
$scope.$digest();
if ($sniffer.transitions) {
expect(element.attr('class')).toContain('custom-show-setup');
expect(element.attr('class')).toContain('custom-show');
window.setTimeout.expect(1).process();
expect(element.attr('class')).toContain('custom-show-start');
expect(element.attr('class')).toContain('custom-show-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(element.attr('class')).not.toContain('custom-show-start');
expect(element.attr('class')).not.toContain('custom-show-setup');
expect(element.attr('class')).not.toContain('custom-show-active');
expect(element.attr('class')).not.toContain('custom-show');
$scope.on = false;
$scope.$digest();
if ($sniffer.transitions) {
expect(element.attr('class')).toContain('custom-hide-setup');
expect(element.attr('class')).toContain('custom-hide');
window.setTimeout.expect(1).process();
expect(element.attr('class')).toContain('custom-hide-start');
expect(element.attr('class')).toContain('custom-hide-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(element.attr('class')).not.toContain('custom-hide-start');
expect(element.attr('class')).not.toContain('custom-hide-setup');
expect(element.attr('class')).not.toContain('custom-hide-active');
expect(element.attr('class')).not.toContain('custom-hide');
}));
it('should skip animation if parent animation running', function() {
@ -158,32 +158,32 @@ describe('ngShow / ngHide - ngAnimate', function() {
$scope.$digest();
if ($sniffer.transitions) {
expect(element.attr('class')).toContain('custom-hide-setup');
expect(element.attr('class')).toContain('custom-hide');
window.setTimeout.expect(1).process();
expect(element.attr('class')).toContain('custom-hide-start');
expect(element.attr('class')).toContain('custom-hide-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(element.attr('class')).not.toContain('custom-hide-start');
expect(element.attr('class')).not.toContain('custom-hide-setup');
expect(element.attr('class')).not.toContain('custom-hide-active');
expect(element.attr('class')).not.toContain('custom-hide');
$scope.off = false;
$scope.$digest();
if ($sniffer.transitions) {
expect(element.attr('class')).toContain('custom-show-setup');
expect(element.attr('class')).toContain('custom-show');
window.setTimeout.expect(1).process();
expect(element.attr('class')).toContain('custom-show-start');
expect(element.attr('class')).toContain('custom-show-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(element.attr('class')).not.toContain('custom-show-start');
expect(element.attr('class')).not.toContain('custom-show-setup');
expect(element.attr('class')).not.toContain('custom-show-active');
expect(element.attr('class')).not.toContain('custom-show');
}));
it('should disable animation when parent animation is running', function() {

View file

@ -262,17 +262,17 @@ describe('ngSwitch ngAnimate', function() {
var first = element.children()[0];
if ($sniffer.transitions) {
expect(first.className).toContain('cool-enter-setup');
expect(first.className).toContain('cool-enter');
window.setTimeout.expect(1).process();
expect(first.className).toContain('cool-enter-start');
expect(first.className).toContain('cool-enter-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(first.className).not.toContain('cool-enter-setup');
expect(first.className).not.toContain('cool-enter-start');
expect(first.className).not.toContain('cool-enter');
expect(first.className).not.toContain('cool-enter-active');
}));
@ -307,7 +307,7 @@ describe('ngSwitch ngAnimate', function() {
if ($sniffer.transitions) {
expect(first.className).toContain('cool-leave-setup');
expect(first.className).toContain('cool-leave');
window.setTimeout.expect(1).process();
window.setTimeout.expect(1).process();
} else {
@ -316,15 +316,15 @@ describe('ngSwitch ngAnimate', function() {
if ($sniffer.transitions) {
expect(first.className).toContain('cool-leave-start');
expect(first.className).toContain('cool-leave-active');
window.setTimeout.expect(1000).process();
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(first.className).not.toContain('cool-leave-setup');
expect(first.className).not.toContain('cool-leave-start');
expect(first.className).not.toContain('cool-leave');
expect(first.className).not.toContain('cool-leave-active');
}));
it('should catch and use the correct duration for animation',

View file

@ -555,17 +555,17 @@ describe('ngView', function() {
applyCSS(child, 'transition', '1s linear all');
if ($sniffer.transitions) {
expect(child.attr('class')).toContain('custom-enter-setup');
expect(child.attr('class')).toContain('custom-enter');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-enter-start');
expect(child.attr('class')).toContain('custom-enter-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(child.attr('class')).not.toContain('custom-enter-setup');
expect(child.attr('class')).not.toContain('custom-enter-start');
expect(child.attr('class')).not.toContain('custom-enter');
expect(child.attr('class')).not.toContain('custom-enter-active');
}));
it('should fire off the leave animation + add and remove the css classes',
@ -584,17 +584,17 @@ describe('ngView', function() {
$rootScope.$digest();
if ($sniffer.transitions) {
expect(child.attr('class')).toContain('custom-leave-setup');
expect(child.attr('class')).toContain('custom-leave');
window.setTimeout.expect(1).process();
expect(child.attr('class')).toContain('custom-leave-start');
expect(child.attr('class')).toContain('custom-leave-active');
window.setTimeout.expect(1000).process();
} else {
expect(window.setTimeout.queue).toEqual([]);
}
expect(child.attr('class')).not.toContain('custom-leave-setup');
expect(child.attr('class')).not.toContain('custom-leave-start');
expect(child.attr('class')).not.toContain('custom-leave');
expect(child.attr('class')).not.toContain('custom-leave-active');
}));
it('should catch and use the correct duration for animations',