@@ -179,7 +179,7 @@ describe("animations", function() {
179
179
} ) ;
180
180
} ) ;
181
181
182
- it ( 'should animate only the specified CSS className matched within $animateProvider.classNameFilter' , function ( ) {
182
+ it ( 'should animate only the specified CSS className matched within $animateProvider.classNameFilter for div ' , function ( ) {
183
183
module ( function ( $animateProvider ) {
184
184
$animateProvider . classNameFilter ( / o n l y - a l l o w - t h i s - a n i m a t i o n / ) ;
185
185
} ) ;
@@ -198,6 +198,26 @@ describe("animations", function() {
198
198
} ) ;
199
199
} ) ;
200
200
201
+ it ( 'should animate only the specified CSS className matched within $animateProvider.classNameFilter for svg' , function ( ) {
202
+ module ( function ( $animateProvider ) {
203
+ $animateProvider . classNameFilter ( / o n l y - a l l o w - t h i s - a n i m a t i o n - s v g / ) ;
204
+ } ) ;
205
+ inject ( function ( $animate , $rootScope , $compile ) {
206
+ var svgElement = $compile ( '<svg class="element"></svg>' ) ( $rootScope ) ;
207
+ expect ( svgElement ) . not . toHaveClass ( 'only-allow-this-animation-svg' ) ;
208
+
209
+ $animate . enter ( svgElement , parent ) ;
210
+ $rootScope . $digest ( ) ;
211
+ expect ( capturedAnimation ) . toBeFalsy ( ) ;
212
+
213
+ svgElement . attr ( 'class' , 'element only-allow-this-animation-svg' ) ;
214
+
215
+ $animate . leave ( svgElement , parent ) ;
216
+ $rootScope . $digest ( ) ;
217
+ expect ( capturedAnimation ) . toBeTruthy ( ) ;
218
+ } ) ;
219
+ } ) ;
220
+
201
221
they ( 'should not apply the provided options.$prop value unless it\'s a string or string-based array' , [ 'addClass' , 'removeClass' ] , function ( prop ) {
202
222
inject ( function ( $animate , $rootScope ) {
203
223
var startingCssClasses = element . attr ( 'class' ) || '' ;
0 commit comments