@@ -179,7 +179,7 @@ describe("animations", function() {
179179 } ) ;
180180 } ) ;
181181
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 ( ) {
183183 module ( function ( $animateProvider ) {
184184 $animateProvider . classNameFilter ( / o n l y - a l l o w - t h i s - a n i m a t i o n / ) ;
185185 } ) ;
@@ -198,6 +198,26 @@ describe("animations", function() {
198198 } ) ;
199199 } ) ;
200200
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+
201221 they ( 'should not apply the provided options.$prop value unless it\'s a string or string-based array' , [ 'addClass' , 'removeClass' ] , function ( prop ) {
202222 inject ( function ( $animate , $rootScope ) {
203223 var startingCssClasses = element . attr ( 'class' ) || '' ;
0 commit comments