diff options
| author | Matias Niemelàˆ | 2013-05-07 17:11:39 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-05-08 16:03:31 -0700 | 
| commit | 11f712bc3e310302eb2e8691cf6d110bdcde1810 (patch) | |
| tree | 5e8b27a3dc2a8b0b18a4e0560f21f007206772b5 /test | |
| parent | 14757874a7cea7961f31211b245c417bd4b20512 (diff) | |
| download | angular.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 {...}
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/animatorSpec.js | 20 | ||||
| -rwxr-xr-x | test/ng/directive/ngIfSpec.js | 12 | ||||
| -rw-r--r-- | test/ng/directive/ngIncludeSpec.js | 16 | ||||
| -rw-r--r-- | test/ng/directive/ngRepeatSpec.js | 36 | ||||
| -rw-r--r-- | test/ng/directive/ngShowHideSpec.js | 32 | ||||
| -rw-r--r-- | test/ng/directive/ngSwitchSpec.js | 16 | ||||
| -rw-r--r-- | test/ng/directive/ngViewSpec.js | 16 | 
7 files changed, 74 insertions, 74 deletions
| 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', | 
