@@ -621,10 +621,8 @@ describe('form animations', function() {
621621 it ( 'should trigger an animation when invalid' , inject ( function ( $animate ) {
622622 form . $setValidity ( 'required' , false ) ;
623623
624- assertValidAnimation ( $animate . queue [ 0 ] , 'removeClass' , 'ng-valid' ) ;
625- assertValidAnimation ( $animate . queue [ 1 ] , 'addClass' , 'ng-invalid' ) ;
626- assertValidAnimation ( $animate . queue [ 2 ] , 'removeClass' , 'ng-valid-required' ) ;
627- assertValidAnimation ( $animate . queue [ 3 ] , 'addClass' , 'ng-invalid-required' ) ;
624+ assertValidAnimation ( $animate . queue [ 0 ] , 'setClass' , 'ng-invalid' , 'ng-valid' ) ;
625+ assertValidAnimation ( $animate . queue [ 1 ] , 'setClass' , 'ng-invalid-required' , 'ng-valid-required' ) ;
628626 } ) ) ;
629627
630628 it ( 'should trigger an animation when valid' , inject ( function ( $animate ) {
@@ -634,10 +632,8 @@ describe('form animations', function() {
634632
635633 form . $setValidity ( 'required' , true ) ;
636634
637- assertValidAnimation ( $animate . queue [ 0 ] , 'removeClass' , 'ng-invalid' ) ;
638- assertValidAnimation ( $animate . queue [ 1 ] , 'addClass' , 'ng-valid' ) ;
639- assertValidAnimation ( $animate . queue [ 2 ] , 'removeClass' , 'ng-invalid-required' ) ;
640- assertValidAnimation ( $animate . queue [ 3 ] , 'addClass' , 'ng-valid-required' ) ;
635+ assertValidAnimation ( $animate . queue [ 0 ] , 'setClass' , 'ng-valid' , 'ng-invalid' ) ;
636+ assertValidAnimation ( $animate . queue [ 1 ] , 'setClass' , 'ng-valid-required' , 'ng-invalid-required' ) ;
641637 } ) ) ;
642638
643639 it ( 'should trigger an animation when dirty' , inject ( function ( $animate ) {
@@ -661,17 +657,13 @@ describe('form animations', function() {
661657 it ( 'should trigger custom errors as addClass/removeClass when invalid/valid' , inject ( function ( $animate ) {
662658 form . $setValidity ( 'custom-error' , false ) ;
663659
664- assertValidAnimation ( $animate . queue [ 0 ] , 'removeClass' , 'ng-valid' ) ;
665- assertValidAnimation ( $animate . queue [ 1 ] , 'addClass' , 'ng-invalid' ) ;
666- assertValidAnimation ( $animate . queue [ 2 ] , 'removeClass' , 'ng-valid-custom-error' ) ;
667- assertValidAnimation ( $animate . queue [ 3 ] , 'addClass' , 'ng-invalid-custom-error' ) ;
660+ assertValidAnimation ( $animate . queue [ 0 ] , 'setClass' , 'ng-invalid' , 'ng-valid' ) ;
661+ assertValidAnimation ( $animate . queue [ 1 ] , 'setClass' , 'ng-invalid-custom-error' , 'ng-valid-custom-error' ) ;
668662
669663 $animate . queue = [ ] ;
670664 form . $setValidity ( 'custom-error' , true ) ;
671665
672- assertValidAnimation ( $animate . queue [ 0 ] , 'removeClass' , 'ng-invalid' ) ;
673- assertValidAnimation ( $animate . queue [ 1 ] , 'addClass' , 'ng-valid' ) ;
674- assertValidAnimation ( $animate . queue [ 2 ] , 'removeClass' , 'ng-invalid-custom-error' ) ;
675- assertValidAnimation ( $animate . queue [ 3 ] , 'addClass' , 'ng-valid-custom-error' ) ;
666+ assertValidAnimation ( $animate . queue [ 0 ] , 'setClass' , 'ng-valid' , 'ng-invalid' ) ;
667+ assertValidAnimation ( $animate . queue [ 1 ] , 'setClass' , 'ng-valid-custom-error' , 'ng-invalid-custom-error' ) ;
676668 } ) ) ;
677669} ) ;
0 commit comments