1- import { TestBed , waitForAsync , inject } from '@angular/core/testing' ;
1+ import { TestBed , waitForAsync } from '@angular/core/testing' ;
22import { Component , ViewEncapsulation , ViewChild , ElementRef } from '@angular/core' ;
33import { By } from '@angular/platform-browser' ;
4- import { Platform , _getShadowRoot , _supportsShadowDom } from '@angular/cdk/platform' ;
4+ import { _getShadowRoot , _supportsShadowDom } from '@angular/cdk/platform' ;
55import { CommonModule } from '@angular/common' ;
66import {
77 MatProgressSpinnerModule ,
@@ -158,13 +158,7 @@ describe('MatProgressSpinner', () => {
158158 } ) ;
159159
160160 it ( 'should add a style tag with the indeterminate animation to the document head when using a ' +
161- 'non-default diameter' , inject ( [ Platform ] , ( platform : Platform ) => {
162- // On Edge and IE we use a fallback animation because the
163- // browser doesn't support animating SVG correctly.
164- if ( platform . EDGE || platform . TRIDENT ) {
165- return ;
166- }
167-
161+ 'non-default diameter' , ( ) => {
168162 const fixture = TestBed . createComponent ( ProgressSpinnerCustomDiameter ) ;
169163 fixture . componentInstance . diameter = 32 ;
170164 fixture . detectChanges ( ) ;
@@ -184,7 +178,7 @@ describe('MatProgressSpinner', () => {
184178
185179 expect ( document . head . querySelectorAll ( 'style[mat-spinner-animation="32"]' ) . length ) . toBe ( 1 ) ;
186180 expect ( document . head . querySelectorAll ( 'style[mat-spinner-animation="64"]' ) . length ) . toBe ( 1 ) ;
187- } ) ) ;
181+ } ) ;
188182
189183 it ( 'should allow floating point values for custom diameter' , ( ) => {
190184 const fixture = TestBed . createComponent ( ProgressSpinnerCustomDiameter ) ;
@@ -207,26 +201,19 @@ describe('MatProgressSpinner', () => {
207201 . toBe ( '0 0 25.75 25.75' , 'Expected the custom diameter to be applied to the svg viewBox.' ) ;
208202 } ) ;
209203
210- it ( 'should handle creating animation style tags based on a floating point diameter' ,
211- inject ( [ Platform ] , ( platform : Platform ) => {
212- // On Edge and IE we use a fallback animation because the
213- // browser doesn't support animating SVG correctly.
214- if ( platform . EDGE || platform . TRIDENT ) {
215- return ;
216- }
217-
218- const fixture = TestBed . createComponent ( IndeterminateSpinnerCustomDiameter ) ;
204+ it ( 'should handle creating animation style tags based on a floating point diameter' , ( ) => {
205+ const fixture = TestBed . createComponent ( IndeterminateSpinnerCustomDiameter ) ;
219206
220- fixture . componentInstance . diameter = 32.5 ;
221- fixture . detectChanges ( ) ;
207+ fixture . componentInstance . diameter = 32.5 ;
208+ fixture . detectChanges ( ) ;
222209
223- const circleElement = fixture . nativeElement . querySelector ( 'circle' ) ;
210+ const circleElement = fixture . nativeElement . querySelector ( 'circle' ) ;
224211
225- expect ( circleElement . style . animationName ) . toBe ( 'mat-progress-spinner-stroke-rotate-32_5' ,
226- 'Expected the spinner circle element to have an animation name based on the custom diameter' ) ;
227- expect ( document . head . querySelectorAll ( 'style[mat-spinner-animation="32_5"]' ) . length ) . toBe ( 1 ,
228- 'Expected a style tag with the indeterminate animation to be attached to the document head' ) ;
229- } ) ) ;
212+ expect ( circleElement . style . animationName ) . toBe ( 'mat-progress-spinner-stroke-rotate-32_5' ,
213+ 'Expected the spinner circle element to have an animation name based on the custom diameter' ) ;
214+ expect ( document . head . querySelectorAll ( 'style[mat-spinner-animation="32_5"]' ) . length ) . toBe ( 1 ,
215+ 'Expected a style tag with the indeterminate animation to be attached to the document head' ) ;
216+ } ) ;
230217
231218 it ( 'should allow a custom stroke width' , ( ) => {
232219 const fixture = TestBed . createComponent ( ProgressSpinnerCustomStrokeWidth ) ;
0 commit comments