@@ -2054,7 +2054,7 @@ describe("ngAnimate $animateCss", function() {
2054
2054
} ) ;
2055
2055
} ) ;
2056
2056
2057
- describe ( "[transtionStyle ]" , function ( ) {
2057
+ describe ( "[transitionStyle ]" , function ( ) {
2058
2058
it ( "should apply the transition directly onto the element and animate accordingly" ,
2059
2059
inject ( function ( $animateCss , $rootElement ) {
2060
2060
@@ -2129,6 +2129,29 @@ describe("ngAnimate $animateCss", function() {
2129
2129
expect ( element . css ( 'transition-property' ) ) . toMatch ( 'color' ) ;
2130
2130
expect ( style ) . toContain ( 'ease-in' ) ;
2131
2131
} ) ) ;
2132
+
2133
+ it ( "should only execute the animation if any CSS to styles are mixed into together" ,
2134
+ inject ( function ( $animateCss , $rootElement ) {
2135
+
2136
+ var options = {
2137
+ transitionStyle : '6s 4s ease-out all'
2138
+ } ;
2139
+
2140
+ $animateCss ( element , options ) . start ( ) ;
2141
+ triggerAnimationStartFrame ( ) ;
2142
+
2143
+ expect ( element . css ( prefix + 'transition-delay' ) ) . not . toEqual ( '4s' ) ;
2144
+ expect ( element . css ( prefix + 'transition-duration' ) ) . not . toEqual ( '6s' ) ;
2145
+ expect ( element . css ( prefix + 'transition-timing-function' ) ) . not . toEqual ( 'ease-out' ) ;
2146
+
2147
+ options . to = { color : 'brown' } ;
2148
+ $animateCss ( element , options ) . start ( ) ;
2149
+ triggerAnimationStartFrame ( ) ;
2150
+
2151
+ expect ( element . css ( prefix + 'transition-delay' ) ) . toEqual ( '4s' ) ;
2152
+ expect ( element . css ( prefix + 'transition-duration' ) ) . toEqual ( '6s' ) ;
2153
+ expect ( element . css ( prefix + 'transition-timing-function' ) ) . toEqual ( 'ease-out' ) ;
2154
+ } ) ) ;
2132
2155
} ) ;
2133
2156
2134
2157
describe ( "[keyframeStyle]" , function ( ) {
0 commit comments