@@ -2017,7 +2017,7 @@ describe("ngAnimate $animateCss", function() {
2017
2017
} ) ;
2018
2018
} ) ;
2019
2019
2020
- describe ( "[transtionStyle ]" , function ( ) {
2020
+ describe ( "[transitionStyle ]" , function ( ) {
2021
2021
it ( "should apply the transition directly onto the element and animate accordingly" ,
2022
2022
inject ( function ( $animateCss , $rootElement ) {
2023
2023
@@ -2092,6 +2092,29 @@ describe("ngAnimate $animateCss", function() {
2092
2092
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2093
2093
expect ( style ) . toContain ( 'ease-in' ) ;
2094
2094
} ) ) ;
2095
+
2096
+ it ( "should only execute the animation if any CSS to styles are mixed into together" ,
2097
+ inject ( function ( $animateCss , $rootElement ) {
2098
+
2099
+ var options = {
2100
+ transitionStyle : '6s 4s ease-out all'
2101
+ } ;
2102
+
2103
+ $animateCss ( element , options ) . start ( ) ;
2104
+ triggerAnimationStartFrame ( ) ;
2105
+
2106
+ expect ( element . css ( prefix + 'transition-delay' ) ) . not . toEqual ( '4s' ) ;
2107
+ expect ( element . css ( prefix + 'transition-duration' ) ) . not . toEqual ( '6s' ) ;
2108
+ expect ( element . css ( prefix + 'transition-timing-function' ) ) . not . toEqual ( 'ease-out' ) ;
2109
+
2110
+ options . to = { color : 'brown' } ;
2111
+ $animateCss ( element , options ) . start ( ) ;
2112
+ triggerAnimationStartFrame ( ) ;
2113
+
2114
+ expect ( element . css ( prefix + 'transition-delay' ) ) . toEqual ( '4s' ) ;
2115
+ expect ( element . css ( prefix + 'transition-duration' ) ) . toEqual ( '6s' ) ;
2116
+ expect ( element . css ( prefix + 'transition-timing-function' ) ) . toEqual ( 'ease-out' ) ;
2117
+ } ) ) ;
2095
2118
} ) ;
2096
2119
2097
2120
describe ( "[keyframeStyle]" , function ( ) {
0 commit comments