@@ -638,7 +638,7 @@ describe("ngAnimate $animateCss", function() {
638
638
it ( "should apply all transition shorthand properties that are already on the element" ,
639
639
inject ( function ( $animateCss , $rootElement ) {
640
640
641
- ss . addRule ( '.action' , 'transition: color 1s ease-out 5s;' ) ;
641
+ ss . addRule ( '.action' , 'transition: color 1s cubic-bezier(0.25, 0.1, 0.25, 1) 5s;' ) ;
642
642
element . addClass ( 'action' ) ;
643
643
644
644
var options = {
@@ -649,18 +649,17 @@ describe("ngAnimate $animateCss", function() {
649
649
animator . start ( ) ;
650
650
triggerAnimationStartFrame ( ) ;
651
651
652
- var style = element . attr ( 'style' ) ;
653
652
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
654
653
expect ( element . css ( 'transition-delay' ) ) . toMatch ( '5s' ) ;
655
654
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
656
- expect ( style ) . toContain ( 'ease-out ') ;
655
+ expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
657
656
} ) ) ;
658
657
659
658
it ( "should apply all explicit transition properties that are already on the element" ,
660
659
inject ( function ( $animateCss , $rootElement ) {
661
660
662
661
ss . addRule ( '.action' , 'transition-duration: 1s;' +
663
- 'transition-timing-function: ease-out ;' +
662
+ 'transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1) ;' +
664
663
'transition-property: color;' +
665
664
'transition-delay: 5s' ) ;
666
665
element . addClass ( 'action' ) ;
@@ -673,11 +672,10 @@ describe("ngAnimate $animateCss", function() {
673
672
animator . start ( ) ;
674
673
triggerAnimationStartFrame ( ) ;
675
674
676
- var style = element . attr ( 'style' ) ;
677
675
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
678
676
expect ( element . css ( 'transition-delay' ) ) . toMatch ( '5s' ) ;
679
677
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
680
- expect ( style ) . toContain ( 'ease-out ') ;
678
+ expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
681
679
} ) ) ;
682
680
683
681
} ) ;
@@ -1901,7 +1899,7 @@ describe("ngAnimate $animateCss", function() {
1901
1899
1902
1900
var style = element . attr ( 'style' ) ;
1903
1901
expect ( style ) . toContain ( '3000s' ) ;
1904
- expect ( style ) . toContain ( 'ease' ) ;
1902
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
1905
1903
} ) ) ;
1906
1904
1907
1905
it ( "should be applied to a CSS keyframe animation directly if keyframes are detected within the CSS class" ,
@@ -2007,7 +2005,7 @@ describe("ngAnimate $animateCss", function() {
2007
2005
expect ( style ) . toMatch ( / a n i m a t i o n (?: - d u r a t i o n ) ? : \s * 4 s / ) ;
2008
2006
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '4s' ) ;
2009
2007
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all' ) ;
2010
- expect ( style ) . toContain ( 'linear' ) ;
2008
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'linear' , 'cubic-bezier(0, 0, 1, 1) ') ;
2011
2009
} ) ) ;
2012
2010
} ) ;
2013
2011
@@ -2349,10 +2347,9 @@ describe("ngAnimate $animateCss", function() {
2349
2347
animator . start ( ) ;
2350
2348
triggerAnimationStartFrame ( ) ;
2351
2349
2352
- var style = element . attr ( 'style' ) ;
2353
2350
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '4s' ) ;
2354
2351
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2355
- expect ( style ) . toContain ( 'ease-in' ) ;
2352
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease-in' , 'cubic-bezier(0.42, 0, 1, 1) ') ;
2356
2353
} ) ) ;
2357
2354
2358
2355
it ( "should give priority to the provided delay value, but only update the delay style itself" ,
@@ -2603,11 +2600,9 @@ describe("ngAnimate $animateCss", function() {
2603
2600
animator . start ( ) ;
2604
2601
triggerAnimationStartFrame ( ) ;
2605
2602
2606
-
2607
- var style = element . attr ( 'style' ) ;
2608
2603
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '2.5s' ) ;
2609
2604
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all' ) ;
2610
- expect ( style ) . toContain ( 'ease' ) ;
2605
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
2611
2606
} ) ) ;
2612
2607
2613
2608
it ( "should remove all inline transition styling when an animation completes" ,
@@ -2738,7 +2733,7 @@ describe("ngAnimate $animateCss", function() {
2738
2733
it ( "should apply a transition duration if the existing transition duration's property value is not 'all'" ,
2739
2734
inject ( function ( $animateCss , $rootElement ) {
2740
2735
2741
- ss . addRule ( '.ng-enter' , 'transition: 1s linear color' ) ;
2736
+ ss . addRule ( '.ng-enter' , 'transition: 1s cubic-bezier(0.25, 0.1, 0.25, 1) color' ) ;
2742
2737
2743
2738
var emptyObject = { } ;
2744
2739
var options = {
@@ -2752,10 +2747,9 @@ describe("ngAnimate $animateCss", function() {
2752
2747
triggerAnimationStartFrame ( ) ;
2753
2748
2754
2749
2755
- var style = element . attr ( 'style' ) ;
2756
2750
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
2757
2751
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2758
- expect ( style ) . toContain ( 'linear ') ;
2752
+ expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
2759
2753
} ) ) ;
2760
2754
2761
2755
it ( "should apply a transition duration and an animation duration if duration + styles options are provided for a matching keyframe animation" ,
0 commit comments