|
1 | | -import {waitForAsync, TestBed} from '@angular/core/testing'; |
| 1 | +import {TestBed} from '@angular/core/testing'; |
2 | 2 | import {By} from '@angular/platform-browser'; |
3 | | -import {Component, ElementRef, ViewChild, ViewEncapsulation, signal} from '@angular/core'; |
| 3 | +import {Component, signal} from '@angular/core'; |
4 | 4 | import {MatProgressSpinnerModule} from './progress-spinner-module'; |
5 | 5 | import {MatProgressSpinner, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS} from './progress-spinner'; |
6 | 6 |
|
7 | 7 | describe('MatProgressSpinner', () => { |
8 | | - beforeEach(waitForAsync(() => { |
9 | | - TestBed.configureTestingModule({ |
10 | | - imports: [ |
11 | | - MatProgressSpinnerModule, |
12 | | - BasicProgressSpinner, |
13 | | - IndeterminateProgressSpinner, |
14 | | - ProgressSpinnerWithValueAndBoundMode, |
15 | | - ProgressSpinnerWithColor, |
16 | | - ProgressSpinnerCustomStrokeWidth, |
17 | | - ProgressSpinnerCustomDiameter, |
18 | | - SpinnerWithColor, |
19 | | - ProgressSpinnerWithStringValues, |
20 | | - IndeterminateSpinnerInShadowDom, |
21 | | - IndeterminateSpinnerInShadowDomWithNgIf, |
22 | | - SpinnerWithMode, |
23 | | - ], |
24 | | - }); |
25 | | - })); |
26 | | - |
27 | 8 | it('should apply a mode of "determinate" if no mode is provided.', () => { |
28 | 9 | let fixture = TestBed.createComponent(BasicProgressSpinner); |
29 | 10 | fixture.detectChanges(); |
@@ -456,35 +437,6 @@ class ProgressSpinnerWithColor { |
456 | 437 | }) |
457 | 438 | class ProgressSpinnerWithStringValues {} |
458 | 439 |
|
459 | | -@Component({ |
460 | | - template: ` |
461 | | - <mat-progress-spinner mode="indeterminate" [diameter]="diameter"></mat-progress-spinner> |
462 | | - `, |
463 | | - encapsulation: ViewEncapsulation.ShadowDom, |
464 | | - imports: [MatProgressSpinnerModule], |
465 | | -}) |
466 | | -class IndeterminateSpinnerInShadowDom { |
467 | | - diameter: number; |
468 | | -} |
469 | | - |
470 | | -@Component({ |
471 | | - template: ` |
472 | | - @if (true) { |
473 | | - <div> |
474 | | - <mat-progress-spinner mode="indeterminate" [diameter]="diameter"></mat-progress-spinner> |
475 | | - </div> |
476 | | - } |
477 | | - `, |
478 | | - encapsulation: ViewEncapsulation.ShadowDom, |
479 | | - imports: [MatProgressSpinnerModule], |
480 | | -}) |
481 | | -class IndeterminateSpinnerInShadowDomWithNgIf { |
482 | | - @ViewChild(MatProgressSpinner, {read: ElementRef}) |
483 | | - spinner: ElementRef<HTMLElement>; |
484 | | - |
485 | | - diameter: number; |
486 | | -} |
487 | | - |
488 | 440 | @Component({ |
489 | 441 | template: '<mat-spinner mode="determinate"></mat-spinner>', |
490 | 442 | imports: [MatProgressSpinnerModule], |
|
0 commit comments