Skip to content

Commit 195260b

Browse files
committed
test(material/progress-spinner): clean up unnecessary imports in tests
Removes imports from tests that aren't necessary anymore, because we're using standalone.
1 parent 76f1bc1 commit 195260b

File tree

2 files changed

+2
-54
lines changed

2 files changed

+2
-54
lines changed

src/material/progress-spinner/progress-spinner.spec.ts

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
import {waitForAsync, TestBed} from '@angular/core/testing';
1+
import {TestBed} from '@angular/core/testing';
22
import {By} from '@angular/platform-browser';
3-
import {Component, ElementRef, ViewChild, ViewEncapsulation, signal} from '@angular/core';
3+
import {Component, signal} from '@angular/core';
44
import {MatProgressSpinnerModule} from './progress-spinner-module';
55
import {MatProgressSpinner, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS} from './progress-spinner';
66

77
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-
278
it('should apply a mode of "determinate" if no mode is provided.', () => {
289
let fixture = TestBed.createComponent(BasicProgressSpinner);
2910
fixture.detectChanges();
@@ -456,35 +437,6 @@ class ProgressSpinnerWithColor {
456437
})
457438
class ProgressSpinnerWithStringValues {}
458439

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-
488440
@Component({
489441
template: '<mat-spinner mode="determinate"></mat-spinner>',
490442
imports: [MatProgressSpinnerModule],

src/material/progress-spinner/testing/progress-spinner-harness.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ describe('MatProgressSpinnerHarness', () => {
1010
let loader: HarnessLoader;
1111

1212
beforeEach(() => {
13-
TestBed.configureTestingModule({
14-
imports: [MatProgressSpinnerModule, ProgressSpinnerHarnessTest],
15-
});
16-
1713
fixture = TestBed.createComponent(ProgressSpinnerHarnessTest);
1814
fixture.detectChanges();
1915
loader = TestbedHarnessEnvironment.loader(fixture);

0 commit comments

Comments
 (0)