@@ -634,86 +634,6 @@ describe("ngAnimate $animateCss", function() {
634
634
keyframeProgress ( element , 1 , 20 ) ;
635
635
assertAnimationComplete ( true ) ;
636
636
} ) ) ;
637
-
638
- it ( "should apply all transition shorthand properties that are already on the element" ,
639
- inject ( function ( $animateCss , $rootElement ) {
640
-
641
- ss . addRule ( '.action' , 'transition: color 1s cubic-bezier(0.25, 0.1, 0.25, 1) 5s;' ) ;
642
- element . addClass ( 'action' ) ;
643
-
644
- var options = {
645
- to : { background : 'blue' }
646
- } ;
647
-
648
- var animator = $animateCss ( element , options ) ;
649
- animator . start ( ) ;
650
- triggerAnimationStartFrame ( ) ;
651
-
652
- expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
653
- expect ( element . css ( 'transition-delay' ) ) . toMatch ( '5s' ) ;
654
- expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
655
- expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1)' ) ;
656
- } ) ) ;
657
-
658
- it ( "should apply all explicit transition properties that are already on the element" ,
659
- inject ( function ( $animateCss , $rootElement ) {
660
-
661
- ss . addRule ( '.action' , 'transition-duration: 1s;' +
662
- 'transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);' +
663
- 'transition-property: color;' +
664
- 'transition-delay: 5s' ) ;
665
- element . addClass ( 'action' ) ;
666
-
667
- var options = {
668
- to : { background : 'blue' }
669
- } ;
670
-
671
- var animator = $animateCss ( element , options ) ;
672
- animator . start ( ) ;
673
- triggerAnimationStartFrame ( ) ;
674
-
675
- expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
676
- expect ( element . css ( 'transition-delay' ) ) . toMatch ( '5s' ) ;
677
- expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
678
- expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1)' ) ;
679
- } ) ) ;
680
-
681
- it ( "should use the default transition-property (spec: all) if none is supplied in shorthand" ,
682
- inject ( function ( $animateCss , $rootElement ) {
683
-
684
- ss . addRule ( '.action' , 'transition: 1s ease' ) ;
685
- element . addClass ( 'action' ) ;
686
-
687
- var options = {
688
- to : { background : 'blue' }
689
- } ;
690
-
691
- var animator = $animateCss ( element , options ) ;
692
- animator . start ( ) ;
693
- triggerAnimationStartFrame ( ) ;
694
-
695
- expect ( element . css ( 'transition-property' ) ) . toBe ( 'all' ) ;
696
- } ) ) ;
697
-
698
- it ( "should use the default easing (spec: ease) if none is supplied in shorthand" ,
699
- inject ( function ( $animateCss , $rootElement ) {
700
-
701
- ss . addRule ( '.action' , 'transition: color 1s' ) ;
702
- element . addClass ( 'action' ) ;
703
-
704
- var options = {
705
- to : { background : 'blue' }
706
- } ;
707
-
708
- var animator = $animateCss ( element , options ) ;
709
- animator . start ( ) ;
710
- triggerAnimationStartFrame ( ) ;
711
-
712
- // 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)' ) ;
714
- } ) ) ;
715
-
716
-
717
637
} ) ;
718
638
719
639
describe ( "staggering" , function ( ) {
@@ -2033,7 +1953,7 @@ describe("ngAnimate $animateCss", function() {
2033
1953
2034
1954
var style = element . attr ( 'style' ) ;
2035
1955
expect ( style ) . toContain ( '3000s' ) ;
2036
- expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease' , 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
1956
+ expect ( style ) . toContain ( 'linear ') ;
2037
1957
} ) ) ;
2038
1958
2039
1959
it ( "should be applied to a CSS keyframe animation directly if keyframes are detected within the CSS class" ,
@@ -2139,7 +2059,7 @@ describe("ngAnimate $animateCss", function() {
2139
2059
expect ( style ) . toMatch ( / a n i m a t i o n (?: - d u r a t i o n ) ? : \s * 4 s / ) ;
2140
2060
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '4s' ) ;
2141
2061
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all' ) ;
2142
- expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'linear' , 'cubic-bezier(0, 0, 1, 1) ') ;
2062
+ expect ( style ) . toContain ( 'linear' ) ;
2143
2063
} ) ) ;
2144
2064
} ) ;
2145
2065
@@ -2303,7 +2223,7 @@ describe("ngAnimate $animateCss", function() {
2303
2223
var animator = $animateCss ( element , options ) ;
2304
2224
2305
2225
expect ( element . attr ( 'style' ) || '' ) . not . toContain ( 'animation-delay' ) ;
2306
- expect ( element . css ( 'transition-delay' ) ) . toEqual ( '-2s ') ;
2226
+ expect ( element . attr ( 'style' ) || '' ) . not . toContain ( 'transition-delay ') ;
2307
2227
expect ( classSpy ) . not . toHaveBeenCalled ( ) ;
2308
2228
2309
2229
//redefine the classSpy to assert that the delay values have been
@@ -2481,9 +2401,10 @@ describe("ngAnimate $animateCss", function() {
2481
2401
animator . start ( ) ;
2482
2402
triggerAnimationStartFrame ( ) ;
2483
2403
2404
+ var style = element . attr ( 'style' ) ;
2484
2405
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '4s' ) ;
2485
2406
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2486
- expect ( element . css ( 'transition-timing-function' ) ) . toBeOneOf ( 'ease-in' , 'cubic-bezier(0.42, 0, 1, 1) ') ;
2407
+ expect ( style ) . toContain ( 'ease-in' ) ;
2487
2408
} ) ) ;
2488
2409
2489
2410
it ( "should give priority to the provided delay value, but only update the delay style itself" ,
@@ -2734,9 +2655,11 @@ describe("ngAnimate $animateCss", function() {
2734
2655
animator . start ( ) ;
2735
2656
triggerAnimationStartFrame ( ) ;
2736
2657
2658
+
2659
+ var style = element . attr ( 'style' ) ;
2737
2660
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '2.5s' ) ;
2738
2661
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) ') ;
2662
+ expect ( style ) . toContain ( 'linear ') ;
2740
2663
} ) ) ;
2741
2664
2742
2665
it ( "should remove all inline transition styling when an animation completes" ,
@@ -2867,7 +2790,7 @@ describe("ngAnimate $animateCss", function() {
2867
2790
it ( "should apply a transition duration if the existing transition duration's property value is not 'all'" ,
2868
2791
inject ( function ( $animateCss , $rootElement ) {
2869
2792
2870
- ss . addRule ( '.ng-enter' , 'transition: 1s cubic-bezier(0.25, 0.1, 0.25, 1) color' ) ;
2793
+ ss . addRule ( '.ng-enter' , 'transition: 1s linear color' ) ;
2871
2794
2872
2795
var emptyObject = { } ;
2873
2796
var options = {
@@ -2881,9 +2804,10 @@ describe("ngAnimate $animateCss", function() {
2881
2804
triggerAnimationStartFrame ( ) ;
2882
2805
2883
2806
2807
+ var style = element . attr ( 'style' ) ;
2884
2808
expect ( element . css ( 'transition-duration' ) ) . toMatch ( '1s' ) ;
2885
- expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color ' ) ;
2886
- expect ( element . css ( 'transition-timing-function' ) ) . toBe ( 'cubic-bezier(0.25, 0.1, 0.25, 1) ') ;
2809
+ expect ( element . css ( 'transition-property' ) ) . toMatch ( 'all ' ) ;
2810
+ expect ( style ) . toContain ( 'linear ') ;
2887
2811
} ) ) ;
2888
2812
2889
2813
it ( "should apply a transition duration and an animation duration if duration + styles options are provided for a matching keyframe animation" ,
0 commit comments