diff --git a/src/cdk-experimental/popover-edit/popover-edit.spec.ts b/src/cdk-experimental/popover-edit/popover-edit.spec.ts index fe65e7144b9e..03ee73cd6fa0 100644 --- a/src/cdk-experimental/popover-edit/popover-edit.spec.ts +++ b/src/cdk-experimental/popover-edit/popover-edit.spec.ts @@ -3,7 +3,6 @@ import {DataSource} from '@angular/cdk/collections'; import {DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, TAB, UP_ARROW} from '@angular/cdk/keycodes'; import {CdkTableModule} from '@angular/cdk/table'; import {dispatchKeyboardEvent} from '@angular/cdk/testing/private'; -import {CommonModule} from '@angular/common'; import { ChangeDetectorRef, Component, @@ -399,7 +398,7 @@ describe('CDK Popover Edit', () => { beforeEach(fakeAsync(() => { TestBed.configureTestingModule({ - imports: [CdkTableModule, CdkPopoverEditModule, CommonModule, FormsModule, BidiModule], + imports: [CdkTableModule, CdkPopoverEditModule, FormsModule, BidiModule], declarations: [componentClass], }); fixture = TestBed.createComponent(componentClass); diff --git a/src/cdk/listbox/listbox.spec.ts b/src/cdk/listbox/listbox.spec.ts index 20b737afdeb0..92a545461b3f 100644 --- a/src/cdk/listbox/listbox.spec.ts +++ b/src/cdk/listbox/listbox.spec.ts @@ -9,7 +9,6 @@ import { SPACE, UP_ARROW, } from '@angular/cdk/keycodes'; -import {CommonModule} from '@angular/common'; import {Component, Type, signal} from '@angular/core'; import {TestBed, fakeAsync, tick} from '@angular/core/testing'; import {FormControl, ReactiveFormsModule} from '@angular/forms'; @@ -532,7 +531,6 @@ describe('CdkOption and CdkListbox', () => { it('should allow custom function to compare option values', () => { const {fixture, listbox, options} = setupComponent( ListboxWithObjectValues, - [CommonModule], ); listbox.value = [{name: 'Banana'}]; fixture.detectChanges(); diff --git a/src/cdk/portal/portal.spec.ts b/src/cdk/portal/portal.spec.ts index 889f0a837eb0..7d6d05810a6e 100644 --- a/src/cdk/portal/portal.spec.ts +++ b/src/cdk/portal/portal.spec.ts @@ -1,4 +1,3 @@ -import {CommonModule} from '@angular/common'; import { AfterViewInit, ApplicationRef, @@ -24,7 +23,6 @@ describe('Portals', () => { TestBed.configureTestingModule({ imports: [ PortalModule, - CommonModule, PortalTestApp, UnboundPortalTestApp, ArbitraryViewContainerRefComponent, @@ -728,7 +726,7 @@ class ChocolateInjector { selector: 'pizza-msg', template: '

Pizza

{{snack}}

', standalone: true, - imports: [PortalModule, CommonModule], + imports: [PortalModule], }) class PizzaMsg { snack = inject(Chocolate, {optional: true}); diff --git a/src/cdk/scrolling/virtual-scroll-viewport.spec.ts b/src/cdk/scrolling/virtual-scroll-viewport.spec.ts index dd6087c7dec7..54000570d720 100644 --- a/src/cdk/scrolling/virtual-scroll-viewport.spec.ts +++ b/src/cdk/scrolling/virtual-scroll-viewport.spec.ts @@ -6,7 +6,6 @@ import { ScrollDispatcher, ScrollingModule, } from '@angular/cdk/scrolling'; -import {CommonModule} from '@angular/common'; import { ApplicationRef, Component, @@ -1004,7 +1003,7 @@ describe('CdkVirtualScrollViewport', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ScrollingModule, CommonModule, DelayedInitializationVirtualScroll], + imports: [ScrollingModule, DelayedInitializationVirtualScroll], }); fixture = TestBed.createComponent(DelayedInitializationVirtualScroll); testComponent = fixture.componentInstance; @@ -1034,7 +1033,7 @@ describe('CdkVirtualScrollViewport', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ScrollingModule, CommonModule, VirtualScrollWithAppendOnly], + imports: [ScrollingModule, VirtualScrollWithAppendOnly], }); fixture = TestBed.createComponent(VirtualScrollWithAppendOnly); testComponent = fixture.componentInstance; @@ -1441,7 +1440,7 @@ class VirtualScrollWithItemInjectingViewContainer { `, encapsulation: ViewEncapsulation.None, standalone: true, - imports: [ScrollingModule, CommonModule], + imports: [ScrollingModule], }) class DelayedInitializationVirtualScroll { @ViewChild(CdkVirtualScrollViewport, {static: true}) viewport: CdkVirtualScrollViewport; @@ -1480,7 +1479,7 @@ class DelayedInitializationVirtualScroll { `, encapsulation: ViewEncapsulation.None, standalone: true, - imports: [ScrollingModule, CommonModule], + imports: [ScrollingModule], }) class VirtualScrollWithAppendOnly { @ViewChild(CdkVirtualScrollViewport, {static: true}) viewport: CdkVirtualScrollViewport; diff --git a/src/material-experimental/popover-edit/popover-edit.spec.ts b/src/material-experimental/popover-edit/popover-edit.spec.ts index a23946f4d648..52ee1c7cf75b 100644 --- a/src/material-experimental/popover-edit/popover-edit.spec.ts +++ b/src/material-experimental/popover-edit/popover-edit.spec.ts @@ -1,6 +1,5 @@ import {DataSource} from '@angular/cdk/collections'; import {DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, TAB, UP_ARROW} from '@angular/cdk/keycodes'; -import {CommonModule} from '@angular/common'; import {Component, Directive, ElementRef, ViewChild} from '@angular/core'; import {ComponentFixture, TestBed, fakeAsync, flush, tick} from '@angular/core/testing'; import {FormsModule, NgForm} from '@angular/forms'; @@ -302,7 +301,7 @@ describe('Material Popover Edit', () => { beforeEach(fakeAsync(() => { TestBed.configureTestingModule({ - imports: [MatTableModule, MatPopoverEditModule, CommonModule, FormsModule], + imports: [MatTableModule, MatPopoverEditModule, FormsModule], declarations: [componentClass], }); fixture = TestBed.createComponent(componentClass); diff --git a/src/material/button-toggle/button-toggle.spec.ts b/src/material/button-toggle/button-toggle.spec.ts index bb9e65895be7..2ef8a9b44924 100644 --- a/src/material/button-toggle/button-toggle.spec.ts +++ b/src/material/button-toggle/button-toggle.spec.ts @@ -1,5 +1,4 @@ import {dispatchMouseEvent} from '@angular/cdk/testing/private'; -import {CommonModule} from '@angular/common'; import {Component, DebugElement, QueryList, ViewChild, ViewChildren} from '@angular/core'; import {ComponentFixture, TestBed, fakeAsync, flush, tick} from '@angular/core/testing'; import {FormControl, FormsModule, NgModel, ReactiveFormsModule} from '@angular/forms'; @@ -19,7 +18,6 @@ describe('MatButtonToggle with forms', () => { MatButtonToggleModule, FormsModule, ReactiveFormsModule, - CommonModule, ButtonToggleGroupWithNgModel, ButtonToggleGroupWithFormControl, ButtonToggleGroupWithIndirectDescendantToggles, @@ -1112,7 +1110,7 @@ class ButtonTogglesInsideButtonToggleGroup { `, standalone: true, - imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule], }) class ButtonToggleGroupWithNgModel { groupName = 'group-name'; @@ -1191,7 +1189,7 @@ class ButtonToggleGroupWithInitialValue { `, standalone: true, - imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule], }) class ButtonToggleGroupWithFormControl { control = new FormControl(''); @@ -1209,7 +1207,7 @@ class ButtonToggleGroupWithFormControl { `, standalone: true, - imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule], }) class ButtonToggleGroupWithIndirectDescendantToggles { control = new FormControl(''); @@ -1297,7 +1295,7 @@ class ButtonToggleWithStaticAriaAttributes {} `, standalone: true, - imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatButtonToggleModule, FormsModule, ReactiveFormsModule], }) class ButtonToggleGroupWithFormControlAndDynamicButtons { @ViewChildren(MatButtonToggle) toggles: QueryList; diff --git a/src/material/chips/chip-set.spec.ts b/src/material/chips/chip-set.spec.ts index 04653919415e..61192a4328a7 100644 --- a/src/material/chips/chip-set.spec.ts +++ b/src/material/chips/chip-set.spec.ts @@ -1,4 +1,3 @@ -import {CommonModule} from '@angular/common'; import {Component, DebugElement, QueryList} from '@angular/core'; import {ComponentFixture, TestBed, fakeAsync, tick, waitForAsync} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; @@ -7,7 +6,7 @@ import {MatChip, MatChipSet, MatChipsModule} from './index'; describe('MatChipSet', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [MatChipsModule, CommonModule, BasicChipSet, IndirectDescendantsChipSet], + imports: [MatChipsModule, BasicChipSet, IndirectDescendantsChipSet], }); })); @@ -117,7 +116,7 @@ describe('MatChipSet', () => { `, standalone: true, - imports: [MatChipsModule, CommonModule], + imports: [MatChipsModule], }) class BasicChipSet { name: string = 'Test'; @@ -135,6 +134,6 @@ class BasicChipSet { `, standalone: true, - imports: [MatChipsModule, CommonModule], + imports: [MatChipsModule], }) class IndirectDescendantsChipSet extends BasicChipSet {} diff --git a/src/material/datepicker/datepicker-actions.spec.ts b/src/material/datepicker/datepicker-actions.spec.ts index 1125a563157b..e428604489bc 100644 --- a/src/material/datepicker/datepicker-actions.spec.ts +++ b/src/material/datepicker/datepicker-actions.spec.ts @@ -1,4 +1,3 @@ -import {CommonModule} from '@angular/common'; import {Component, ElementRef, Type, ViewChild} from '@angular/core'; import {ComponentFixture, TestBed, fakeAsync, flush, tick} from '@angular/core/testing'; import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms'; @@ -14,7 +13,6 @@ describe('MatDatepickerActions', () => { TestBed.configureTestingModule({ declarations: [component], imports: [ - CommonModule, FormsModule, MatDatepickerModule, MatFormFieldModule, diff --git a/src/material/progress-spinner/progress-spinner.spec.ts b/src/material/progress-spinner/progress-spinner.spec.ts index 9eeff100ea87..60a337d3a248 100644 --- a/src/material/progress-spinner/progress-spinner.spec.ts +++ b/src/material/progress-spinner/progress-spinner.spec.ts @@ -1,5 +1,4 @@ import {waitForAsync, TestBed} from '@angular/core/testing'; -import {CommonModule} from '@angular/common'; import {By} from '@angular/platform-browser'; import {Component, ElementRef, ViewChild, ViewEncapsulation, signal} from '@angular/core'; import {MatProgressSpinnerModule} from './module'; @@ -10,7 +9,6 @@ describe('MatProgressSpinner', () => { TestBed.configureTestingModule({ imports: [ MatProgressSpinnerModule, - CommonModule, BasicProgressSpinner, IndeterminateProgressSpinner, ProgressSpinnerWithValueAndBoundMode, @@ -398,14 +396,14 @@ describe('MatProgressSpinner', () => { @Component({ template: '', standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class BasicProgressSpinner {} @Component({ template: '', standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class ProgressSpinnerCustomStrokeWidth { strokeWidth: number; @@ -414,7 +412,7 @@ class ProgressSpinnerCustomStrokeWidth { @Component({ template: '', standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class ProgressSpinnerCustomDiameter { diameter: number; @@ -423,14 +421,14 @@ class ProgressSpinnerCustomDiameter { @Component({ template: '', standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class IndeterminateProgressSpinner {} @Component({ template: '', standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class ProgressSpinnerWithValueAndBoundMode { mode = signal('indeterminate'); @@ -441,7 +439,7 @@ class ProgressSpinnerWithValueAndBoundMode { template: ` `, standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class SpinnerWithColor { color = signal('primary'); @@ -451,7 +449,7 @@ class SpinnerWithColor { template: ` `, standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class ProgressSpinnerWithColor { color = signal('primary'); @@ -462,7 +460,7 @@ class ProgressSpinnerWithColor { `, standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class ProgressSpinnerWithStringValues {} @@ -472,7 +470,7 @@ class ProgressSpinnerWithStringValues {} `, encapsulation: ViewEncapsulation.ShadowDom, standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class IndeterminateSpinnerInShadowDom { diameter: number; @@ -488,7 +486,7 @@ class IndeterminateSpinnerInShadowDom { `, encapsulation: ViewEncapsulation.ShadowDom, standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class IndeterminateSpinnerInShadowDomWithNgIf { @ViewChild(MatProgressSpinner, {read: ElementRef}) @@ -500,6 +498,6 @@ class IndeterminateSpinnerInShadowDomWithNgIf { @Component({ template: '', standalone: true, - imports: [MatProgressSpinnerModule, CommonModule], + imports: [MatProgressSpinnerModule], }) class SpinnerWithMode {} diff --git a/src/material/radio/radio.spec.ts b/src/material/radio/radio.spec.ts index 9b288de009ad..a1c8f235dad9 100644 --- a/src/material/radio/radio.spec.ts +++ b/src/material/radio/radio.spec.ts @@ -1,5 +1,4 @@ import {dispatchFakeEvent} from '@angular/cdk/testing/private'; -import {CommonModule} from '@angular/common'; import {Component, DebugElement, ViewChild} from '@angular/core'; import {ComponentFixture, TestBed, fakeAsync, tick, waitForAsync} from '@angular/core/testing'; import {FormControl, FormsModule, NgModel, ReactiveFormsModule} from '@angular/forms'; @@ -19,7 +18,6 @@ describe('MatRadio', () => { MatRadioModule, FormsModule, ReactiveFormsModule, - CommonModule, DisableableRadioButton, FocusableRadioButton, RadiosInsideRadioGroup, @@ -1092,7 +1090,7 @@ describe('MatRadioDefaultOverrides', () => { `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class RadiosInsideRadioGroup { labelPos: 'before' | 'after'; @@ -1115,7 +1113,7 @@ class RadiosInsideRadioGroup { `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class RadiosInsidePreCheckedRadioGroup {} @@ -1141,7 +1139,7 @@ class RadiosInsidePreCheckedRadioGroup {} No name `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class StandaloneRadioButtons { ariaLabel: string = 'Banana'; @@ -1158,7 +1156,7 @@ class StandaloneRadioButtons { `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class RadioGroupWithNgModel { modelValue: string; @@ -1177,7 +1175,7 @@ class RadioGroupWithNgModel { [disabled]="disabled" [disabledInteractive]="disabledInteractive">One`, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class DisableableRadioButton { disabled = false; @@ -1194,7 +1192,7 @@ class DisableableRadioButton { `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class RadioGroupWithFormControl { @ViewChild(MatRadioGroup) group: MatRadioGroup; @@ -1204,7 +1202,7 @@ class RadioGroupWithFormControl { @Component({ template: ``, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class FocusableRadioButton { tabIndex: number; @@ -1217,7 +1215,7 @@ class FocusableRadioButton {
`, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class TranscludingWrapper {} @@ -1232,7 +1230,7 @@ class TranscludingWrapper {} `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule, TranscludingWrapper], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule, TranscludingWrapper], }) class InterleavedRadioGroup { modelValue = 'strawberry'; @@ -1246,7 +1244,7 @@ class InterleavedRadioGroup { @Component({ template: ``, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class RadioButtonWithPredefinedTabindex {} @@ -1271,7 +1269,7 @@ class RadioButtonWithColorBinding {} aria-describedby="something" aria-labelledby="something-else">`, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class RadioButtonWithPredefinedAriaAttributes {} @@ -1292,7 +1290,7 @@ class RadioButtonWithPredefinedAriaAttributes {} `, standalone: true, - imports: [MatRadioModule, FormsModule, ReactiveFormsModule, CommonModule], + imports: [MatRadioModule, FormsModule, ReactiveFormsModule], }) class PreselectedRadioWithStaticValueAndNgIf { @ViewChild('preselectedGroup', {read: MatRadioGroup}) preselectedGroup: MatRadioGroup; diff --git a/src/material/sidenav/drawer.spec.ts b/src/material/sidenav/drawer.spec.ts index cd37f913a0f7..71cbbc619868 100644 --- a/src/material/sidenav/drawer.spec.ts +++ b/src/material/sidenav/drawer.spec.ts @@ -7,7 +7,6 @@ import { dispatchEvent, dispatchKeyboardEvent, } from '@angular/cdk/testing/private'; -import {CommonModule} from '@angular/common'; import {Component, ElementRef, ErrorHandler, ViewChild} from '@angular/core'; import { ComponentFixture, @@ -29,7 +28,6 @@ describe('MatDrawer', () => { MatSidenavModule, A11yModule, NoopAnimationsModule, - CommonModule, BasicTestApp, DrawerContainerNoDrawerTestApp, DrawerSetToOpenedFalse, @@ -1210,7 +1208,7 @@ describe('MatDrawerContainer', () => { @Component({ template: ``, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerContainerNoDrawerTestApp {} @@ -1251,7 +1249,7 @@ class DrawerContainerTwoDrawerTestApp { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class BasicTestApp { openCount = 0; @@ -1297,7 +1295,7 @@ class BasicTestApp { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerSetToOpenedFalse {} @@ -1309,7 +1307,7 @@ class DrawerSetToOpenedFalse {} `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerSetToOpenedTrue { openCallback = jasmine.createSpy('open callback'); @@ -1323,7 +1321,7 @@ class DrawerSetToOpenedTrue { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerOpenBinding { isOpen = false; @@ -1336,7 +1334,7 @@ class DrawerOpenBinding { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerDynamicPosition { drawer1Position = 'start'; @@ -1354,7 +1352,7 @@ class DrawerDynamicPosition { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerWithFocusableElements { mode: string = 'over'; @@ -1369,7 +1367,7 @@ class DrawerWithFocusableElements { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class DrawerWithoutFocusableElements {} @@ -1449,7 +1447,7 @@ class DrawerContainerWithContent { } `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class IndirectDescendantDrawer { @ViewChild('container') container: MatDrawerContainer; @@ -1468,7 +1466,7 @@ class IndirectDescendantDrawer { `, standalone: true, - imports: [MatSidenavModule, A11yModule, CommonModule], + imports: [MatSidenavModule, A11yModule], }) class NestedDrawerContainers { @ViewChild('outerContainer') outerContainer: MatDrawerContainer; diff --git a/src/material/sidenav/sidenav.spec.ts b/src/material/sidenav/sidenav.spec.ts index 03276ab69de1..93cc5b9599ca 100644 --- a/src/material/sidenav/sidenav.spec.ts +++ b/src/material/sidenav/sidenav.spec.ts @@ -1,4 +1,3 @@ -import {CommonModule} from '@angular/common'; import {Component, ViewChild} from '@angular/core'; import {TestBed, fakeAsync, tick, waitForAsync} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; @@ -11,7 +10,6 @@ describe('MatSidenav', () => { imports: [ MatSidenavModule, NoopAnimationsModule, - CommonModule, SidenavWithFixedPosition, IndirectDescendantSidenav, NestedSidenavContainers, @@ -104,7 +102,7 @@ describe('MatSidenav', () => { `, standalone: true, - imports: [MatSidenavModule, CommonModule], + imports: [MatSidenavModule], }) class SidenavWithFixedPosition { fixed = true; @@ -123,7 +121,7 @@ class SidenavWithFixedPosition { Some content. `, standalone: true, - imports: [MatSidenavModule, CommonModule], + imports: [MatSidenavModule], }) class IndirectDescendantSidenav { @ViewChild('container') container: MatSidenavContainer; @@ -142,7 +140,7 @@ class IndirectDescendantSidenav { `, standalone: true, - imports: [MatSidenavModule, CommonModule], + imports: [MatSidenavModule], }) class NestedSidenavContainers { @ViewChild('outerContainer') outerContainer: MatSidenavContainer; diff --git a/src/material/tabs/tab-body.spec.ts b/src/material/tabs/tab-body.spec.ts index 7b01d00bdcd4..3511c7939ed3 100644 --- a/src/material/tabs/tab-body.spec.ts +++ b/src/material/tabs/tab-body.spec.ts @@ -1,7 +1,6 @@ import {Direction, Directionality} from '@angular/cdk/bidi'; import {PortalModule, TemplatePortal} from '@angular/cdk/portal'; import {CdkScrollable, ScrollingModule} from '@angular/cdk/scrolling'; -import {CommonModule} from '@angular/common'; import { AfterViewInit, Component, @@ -26,7 +25,6 @@ describe('MatTabBody', () => { dir = 'ltr'; TestBed.configureTestingModule({ imports: [ - CommonModule, PortalModule, MatRippleModule, NoopAnimationsModule, @@ -195,7 +193,6 @@ describe('MatTabBody', () => { it('should mark the tab body content as a scrollable container', () => { TestBed.resetTestingModule().configureTestingModule({ imports: [ - CommonModule, PortalModule, MatRippleModule, NoopAnimationsModule, @@ -219,7 +216,7 @@ describe('MatTabBody', () => { `, standalone: true, - imports: [CommonModule, PortalModule, MatRippleModule, MatTabBody], + imports: [PortalModule, MatRippleModule, MatTabBody], }) class SimpleTabBodyApp implements AfterViewInit { content = signal(undefined); diff --git a/src/material/tabs/tab-group.spec.ts b/src/material/tabs/tab-group.spec.ts index c028196036f2..e70bad58464e 100644 --- a/src/material/tabs/tab-group.spec.ts +++ b/src/material/tabs/tab-group.spec.ts @@ -1,6 +1,6 @@ import {LEFT_ARROW, RIGHT_ARROW} from '@angular/cdk/keycodes'; import {dispatchFakeEvent, dispatchKeyboardEvent} from '@angular/cdk/testing/private'; -import {CommonModule} from '@angular/common'; +import {AsyncPipe} from '@angular/common'; import {Component, DebugElement, OnInit, QueryList, ViewChild, ViewChildren} from '@angular/core'; import { ComponentFixture, @@ -27,7 +27,6 @@ describe('MatTabGroup', () => { TestBed.configureTestingModule({ imports: [ MatTabsModule, - CommonModule, NoopAnimationsModule, SimpleTabsTestApp, SimpleDynamicTabsTestApp, @@ -1303,7 +1302,7 @@ describe('MatTabGroup labels aligned with a config', () => { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class SimpleTabsTestApp { @ViewChild(MatTabGroup) tabGroup: MatTabGroup; @@ -1341,7 +1340,7 @@ class SimpleTabsTestApp { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class SimpleDynamicTabsTestApp { tabs = [ @@ -1370,7 +1369,7 @@ class SimpleDynamicTabsTestApp { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class BindedTabsTestApp { tabs = [ @@ -1406,7 +1405,7 @@ class BindedTabsTestApp { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class DisabledTabsTestApp { @ViewChildren(MatTab) tabs: QueryList; @@ -1425,7 +1424,7 @@ class DisabledTabsTestApp { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule, AsyncPipe], }) class AsyncTabsTestApp implements OnInit { private _tabs = [ @@ -1453,7 +1452,7 @@ class AsyncTabsTestApp implements OnInit { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TabGroupWithSimpleApi { preserveContent = false; @@ -1476,7 +1475,7 @@ class TabGroupWithSimpleApi { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class NestedTabs { @ViewChildren(MatTabGroup) groups: QueryList; @@ -1496,7 +1495,7 @@ class NestedTabs { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TemplateTabs {} @@ -1507,7 +1506,7 @@ class TemplateTabs {} `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TabGroupWithAriaInputs { ariaLabel: string; @@ -1526,7 +1525,7 @@ class TabGroupWithAriaInputs { } `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TabGroupWithIsActiveBinding {} @@ -1552,7 +1551,7 @@ class TabsWithCustomAnimationDuration {} `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TabGroupWithIndirectDescendantTabs { @ViewChild(MatTabGroup) tabGroup: MatTabGroup; @@ -1589,7 +1588,7 @@ class TabGroupWithInkBarFitToContent { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TabGroupWithSpaceAbove { @ViewChild(MatTabGroup) tabGroup: MatTabGroup; @@ -1613,7 +1612,7 @@ class TabGroupWithSpaceAbove { `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class NestedTabGroupWithLabel {} @@ -1630,7 +1629,7 @@ class NestedTabGroupWithLabel {} `, standalone: true, - imports: [MatTabsModule, CommonModule], + imports: [MatTabsModule], }) class TabsWithClassesTestApp { labelClassList?: string | string[]; diff --git a/src/material/tabs/tab-header.spec.ts b/src/material/tabs/tab-header.spec.ts index d9c4f5cd1683..2b2e41dc4797 100644 --- a/src/material/tabs/tab-header.spec.ts +++ b/src/material/tabs/tab-header.spec.ts @@ -11,7 +11,6 @@ import { dispatchFakeEvent, dispatchKeyboardEvent, } from '@angular/cdk/testing/private'; -import {CommonModule} from '@angular/common'; import {ChangeDetectorRef, Component, ViewChild, inject} from '@angular/core'; import { ComponentFixture, @@ -37,7 +36,6 @@ describe('MatTabHeader', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ - CommonModule, PortalModule, MatRippleModule, ScrollingModule, diff --git a/src/material/toolbar/toolbar.spec.ts b/src/material/toolbar/toolbar.spec.ts index 52f00ab82d6f..ce1d0df979c2 100644 --- a/src/material/toolbar/toolbar.spec.ts +++ b/src/material/toolbar/toolbar.spec.ts @@ -1,4 +1,3 @@ -import {CommonModule} from '@angular/common'; import {Component, signal} from '@angular/core'; import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; @@ -9,7 +8,6 @@ describe('MatToolbar', () => { TestBed.configureTestingModule({ imports: [ MatToolbarModule, - CommonModule, ToolbarSingleRow, ToolbarMultipleRows, ToolbarMixedRowModes, @@ -107,7 +105,7 @@ describe('MatToolbar', () => { `, standalone: true, - imports: [MatToolbarModule, CommonModule], + imports: [MatToolbarModule], }) class ToolbarSingleRow { toolbarColor = signal(''); @@ -121,7 +119,7 @@ class ToolbarSingleRow { `, standalone: true, - imports: [MatToolbarModule, CommonModule], + imports: [MatToolbarModule], }) class ToolbarMultipleRows {} @@ -135,7 +133,7 @@ class ToolbarMultipleRows {} `, standalone: true, - imports: [MatToolbarModule, CommonModule], + imports: [MatToolbarModule], }) class ToolbarMixedRowModes { showToolbarRow = signal(true); @@ -152,6 +150,6 @@ class ToolbarMixedRowModes { `, standalone: true, - imports: [MatToolbarModule, CommonModule], + imports: [MatToolbarModule], }) class ToolbarMultipleIndirectRows {}