2
2
3
3
describe ( "ngAnimate $animateCss" , function ( ) {
4
4
5
+ // IE sets a transition timing function value of "ease" as its cubic bezier equivalent
6
+ var CUBIC_BEZIER_EASE_EQUIVALENT = 'cubic-bezier(0.25, 0.1, 0.25, 1)' ;
7
+
5
8
beforeEach ( module ( 'ngAnimate' ) ) ;
6
9
beforeEach ( module ( 'ngAnimateMock' ) ) ;
7
10
@@ -710,7 +713,7 @@ describe("ngAnimate $animateCss", function() {
710
713
triggerAnimationStartFrame ( ) ;
711
714
712
715
// IE reports ease in cubic-bezier form
713
- expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1)' ) ;
716
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , CUBIC_BEZIER_EASE_EQUIVALENT ) ;
714
717
} ) ) ;
715
718
716
719
@@ -2033,7 +2036,7 @@ describe("ngAnimate $animateCss", function() {
2033
2036
2034
2037
var style = element . attr ( 'style' ) ;
2035
2038
expect ( style ) . toContain ( '3000s' ) ;
2036
- expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1)' ) ;
2039
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , CUBIC_BEZIER_EASE_EQUIVALENT ) ;
2037
2040
} ) ) ;
2038
2041
2039
2042
it ( "should be applied to a CSS keyframe animation directly if keyframes are detected within the CSS class" ,
@@ -2736,7 +2739,7 @@ describe("ngAnimate $animateCss", function() {
2736
2739
2737
2740
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '2.5s' ) ;
2738
2741
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all' ) ;
2739
- expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1)' ) ;
2742
+ expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , CUBIC_BEZIER_EASE_EQUIVALENT ) ;
2740
2743
} ) ) ;
2741
2744
2742
2745
it ( "should remove all inline transition styling when an animation completes" ,
@@ -2867,7 +2870,7 @@ describe("ngAnimate $animateCss", function() {
2867
2870
it ( "should apply a transition duration if the existing transition duration's property value is not 'all'" ,
2868
2871
inject ( function ( $animateCss , $rootElement ) {
2869
2872
2870
- ss . addRule ( '.ng-enter' , 'transition: 1s cubic-bezier(0.25, 0.1, 0.25, 1) color' ) ;
2873
+ ss . addRule ( '.ng-enter' , 'transition: 1s linear color' ) ;
2871
2874
2872
2875
var emptyObject = { } ;
2873
2876
var options = {
@@ -2883,7 +2886,7 @@ describe("ngAnimate $animateCss", function() {
2883
2886
2884
2887
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
2885
2888
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2886
- expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1) ' ) ;
2889
+ expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'linear ' ) ;
2887
2890
} ) ) ;
2888
2891
2889
2892
it ( "should apply a transition duration and an animation duration if duration + styles options are provided for a matching keyframe animation" ,
0 commit comments