aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatias Niemelàˆ2013-05-07 17:11:39 -0400
committerMisko Hevery2013-05-08 16:03:31 -0700
commit11f712bc3e310302eb2e8691cf6d110bdcde1810 (patch)
tree5e8b27a3dc2a8b0b18a4e0560f21f007206772b5
parent14757874a7cea7961f31211b245c417bd4b20512 (diff)
downloadangular.js-11f712bc3e310302eb2e8691cf6d110bdcde1810.tar.bz2
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 {...}
-rw-r--r--docs/src/templates/css/animations.css16
-rw-r--r--src/ng/animator.js21
-rw-r--r--src/ng/directive/ngInclude.js12
-rw-r--r--src/ng/directive/ngRepeat.js18
-rw-r--r--src/ng/directive/ngShowHide.js20
-rw-r--r--src/ng/directive/ngSwitch.js10
-rw-r--r--src/ng/directive/ngView.js10
-rw-r--r--test/ng/animatorSpec.js20
-rwxr-xr-xtest/ng/directive/ngIfSpec.js12
-rw-r--r--test/ng/directive/ngIncludeSpec.js16
-rw-r--r--test/ng/directive/ngRepeatSpec.js36
-rw-r--r--test/ng/directive/ngShowHideSpec.js32
-rw-r--r--test/ng/directive/ngSwitchSpec.js16
-rw-r--r--test/ng/directive/ngViewSpec.js16
14 files changed, 127 insertions, 128 deletions
diff --git a/docs/src/templates/css/animations.css b/docs/src/templates/css/animations.css
index c312f729..d8c983a3 100644
--- a/docs/src/templates/css/animations.css
+++ b/docs/src/templates/css/animations.css
@@ -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;
}
diff --git a/src/ng/animator.js b/src/ng/animator.js
index 97c9e0ed..04ef4a6e 100644
--- a/src/ng/animator.js
+++ b/src/ng/animator.js
@@ -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);
}
}
diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js
index 730c7bdf..1187c733 100644
--- a/src/ng/directive/ngInclude.js
+++ b/src/ng/directive/ngInclude.js
@@ -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>
diff --git a/src/ng/directive/ngRepeat.js b/src/ng/directive/ngRepeat.js
index 0fd53c2f..330f6abb 100644
--- a/src/ng/directive/ngRepeat.js
+++ b/src/ng/directive/ngRepeat.js
@@ -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() {
diff --git a/src/ng/directive/ngShowHide.js b/src/ng/directive/ngShowHide.js
index 7ccc0aa0..7ef7008c 100644
--- a/src/ng/directive/ngShowHide.js
+++ b/src/ng/directive/ngShowHide.js
@@ -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;
diff --git a/src/ng/directive/ngSwitch.js b/src/ng/directive/ngSwitch.js
index 8cf8945d..f36e651c 100644
--- a/src/ng/directive/ngSwitch.js
+++ b/src/ng/directive/ngSwitch.js
@@ -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>
diff --git a/src/ng/directive/ngView.js b/src/ng/directive/ngView.js
index b553544c..9b5694dd 100644
--- a/src/ng/directive/ngView.js
+++ b/src/ng/directive/ngView.js
@@ -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>
diff --git a/test/ng/animatorSpec.js b/test/ng/animatorSpec.js
index 5a8ac1a0..d8d56022 100644
--- a/test/ng/animatorSpec.js
+++ b/test/ng/animatorSpec.js
@@ -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();
}));
diff --git a/test/ng/directive/ngIfSpec.js b/test/ng/directive/ngIfSpec.js
index 3fa523a7..5726e092 100755
--- a/test/ng/directive/ngIfSpec.js
+++ b/test/ng/directive/ngIfSpec.js
@@ -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([]);
diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js
index 46507041..2e8d7023 100644
--- a/test/ng/directive/ngIncludeSpec.js
+++ b/test/ng/directive/ngIncludeSpec.js
@@ -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',
diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js
index 91dcd27f..e7e9af35 100644
--- a/test/ng/directive/ngRepeatSpec.js
+++ b/test/ng/directive/ngRepeatSpec.js
@@ -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',
diff --git a/test/ng/directive/ngShowHideSpec.js b/test/ng/directive/ngShowHideSpec.js
index 46bef95d..9b95440d 100644
--- a/test/ng/directive/ngShowHideSpec.js
+++ b/test/ng/directive/ngShowHideSpec.js
@@ -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() {
diff --git a/test/ng/directive/ngSwitchSpec.js b/test/ng/directive/ngSwitchSpec.js
index 373ce4e1..9ccb3b12 100644
--- a/test/ng/directive/ngSwitchSpec.js
+++ b/test/ng/directive/ngSwitchSpec.js
@@ -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',
diff --git a/test/ng/directive/ngViewSpec.js b/test/ng/directive/ngViewSpec.js
index 908408b3..01ca0d44 100644
--- a/test/ng/directive/ngViewSpec.js
+++ b/test/ng/directive/ngViewSpec.js
@@ -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',