@@ -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
} ) ;
@@ -1899,9 +1897,8 @@ describe("ngAnimate $animateCss", function() {
1899
1897
animator . start ( ) ;
1900
1898
triggerAnimationStartFrame ( ) ;
1901
1899
1902
- var style = element . attr ( 'style' ) ;
1903
1900
expect ( style ) . toContain ( '3000s' ) ;
1904
- expect ( style ) . toContain ( 'ease' ) ;
1901
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
1905
1902
} ) ) ;
1906
1903
1907
1904
it ( "should be applied to a CSS keyframe animation directly if keyframes are detected within the CSS class" ,
@@ -2007,7 +2004,7 @@ describe("ngAnimate $animateCss", function() {
2007
2004
expect ( style ) . toMatch ( / a n i m a t i o n (?: - d u r a t i o n ) ? : \s * 4 s / ) ;
2008
2005
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '4s' ) ;
2009
2006
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all' ) ;
2010
- expect ( style ) . toContain ( 'linear' ) ;
2007
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'linear' , 'cubic-bezier(0, 0, 1, 1) ') ;
2011
2008
} ) ) ;
2012
2009
} ) ;
2013
2010
@@ -2349,10 +2346,9 @@ describe("ngAnimate $animateCss", function() {
2349
2346
animator . start ( ) ;
2350
2347
triggerAnimationStartFrame ( ) ;
2351
2348
2352
- var style = element . attr ( 'style' ) ;
2353
2349
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '4s' ) ;
2354
2350
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2355
- expect ( style ) . toContain ( 'ease-in' ) ;
2351
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease-in' , 'cubic-bezier(0.42, 0, 1, 1) ') ;
2356
2352
} ) ) ;
2357
2353
2358
2354
it ( "should give priority to the provided delay value, but only update the delay style itself" ,
@@ -2603,11 +2599,9 @@ describe("ngAnimate $animateCss", function() {
2603
2599
animator . start ( ) ;
2604
2600
triggerAnimationStartFrame ( ) ;
2605
2601
2606
-
2607
- var style = element . attr ( 'style' ) ;
2608
2602
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '2.5s' ) ;
2609
2603
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all' ) ;
2610
- expect ( style ) . toContain ( 'ease' ) ;
2604
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
2611
2605
} ) ) ;
2612
2606
2613
2607
it ( "should remove all inline transition styling when an animation completes" ,
@@ -2738,7 +2732,7 @@ describe("ngAnimate $animateCss", function() {
2738
2732
it ( "should apply a transition duration if the existing transition duration's property value is not 'all'" ,
2739
2733
inject ( function ( $animateCss , $rootElement ) {
2740
2734
2741
- ss . addRule ( '.ng-enter' , 'transition: 1s linear color' ) ;
2735
+ ss . addRule ( '.ng-enter' , 'transition: 1s cubic-bezier(0.25, 0.1, 0.25, 1) color' ) ;
2742
2736
2743
2737
var emptyObject = { } ;
2744
2738
var options = {
@@ -2752,10 +2746,9 @@ describe("ngAnimate $animateCss", function() {
2752
2746
triggerAnimationStartFrame ( ) ;
2753
2747
2754
2748
2755
- var style = element . attr ( 'style' ) ;
2756
2749
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
2757
2750
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2758
- expect ( style ) . toContain ( 'linear ') ;
2751
+ expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
2759
2752
} ) ) ;
2760
2753
2761
2754
it ( "should apply a transition duration and an animation duration if duration + styles options are provided for a matching keyframe animation" ,
0 commit comments