@@ -2017,7 +2017,7 @@ describe("ngAnimate $animateCss", function() {
20172017 } ) ;
20182018 } ) ;
20192019
2020- describe ( "[transtionStyle ]" , function ( ) {
2020+ describe ( "[transitionStyle ]" , function ( ) {
20212021 it ( "should apply the transition directly onto the element and animate accordingly" ,
20222022 inject ( function ( $animateCss , $rootElement ) {
20232023
@@ -2092,6 +2092,29 @@ describe("ngAnimate $animateCss", function() {
20922092 expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
20932093 expect ( style ) . toContain ( 'ease-in' ) ;
20942094 } ) ) ;
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' ) ) . toEqual ( '' ) ;
2107+ expect ( element . css ( prefix + 'transition-duration' ) ) . toEqual ( '' ) ;
2108+ expect ( element . css ( prefix + 'transition-timing-function' ) ) . toEqual ( '' ) ;
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+ } ) ) ;
20952118 } ) ;
20962119
20972120 describe ( "[keyframeStyle]" , function ( ) {
0 commit comments