From: Tiago Melo Date: Sat, 13 Oct 2018 02:13:11 +0000 (+0100) Subject: mgr/dashboard: Remove unnecessary imports/providers X-Git-Tag: v14.1.0~1130^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb86ecda087440d389945bfc770a2d2e8b3cce88;p=ceph.git mgr/dashboard: Remove unnecessary imports/providers Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts index 5907b882ad54..0a132d766144 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts @@ -13,7 +13,6 @@ import { BehaviorSubject, of } from 'rxjs'; import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper'; import { RbdService } from '../../../shared/api/rbd.service'; -import { ComponentsModule } from '../../../shared/components/components.module'; import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component'; import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum'; import { ExecutingTask } from '../../../shared/models/executing-task'; @@ -44,12 +43,11 @@ describe('RbdListComponent', () => { TooltipModule.forRoot(), ToastModule.forRoot(), AlertModule.forRoot(), - ComponentsModule, RouterTestingModule, HttpClientTestingModule ], declarations: [RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent], - providers: [SummaryService, TaskListService, RbdService] + providers: [TaskListService] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts index 632a7ad35575..39a8d10d09f6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts @@ -50,11 +50,7 @@ describe('RbdSnapshotListComponent', () => { RouterTestingModule, PipesModule ], - providers: [ - { provide: AuthStorageService, useValue: fakeAuthStorageService }, - SummaryService, - TaskListService - ] + providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }, TaskListService] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts index 766d2eed278f..c256c8739f93 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts @@ -24,7 +24,7 @@ describe('RbdTrashListComponent', () => { configureTestBed({ declarations: [RbdTrashListComponent], imports: [SharedModule, HttpClientTestingModule, RouterTestingModule, ToastModule.forRoot()], - providers: [TaskListService, RbdService] + providers: [TaskListService] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts index b6dbc247230a..beea09718e81 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts @@ -9,9 +9,7 @@ import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'; import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { ApiModule } from '../../../shared/api/api.module'; import { NotificationService } from '../../../shared/services/notification.service'; -import { ServicesModule } from '../../../shared/services/services.module'; import { SharedModule } from '../../../shared/shared.module'; import { RbdTrashMoveModalComponent } from './rbd-trash-move-modal.component'; @@ -26,8 +24,6 @@ describe('RbdTrashMoveModalComponent', () => { HttpClientTestingModule, RouterTestingModule, SharedModule, - ServicesModule, - ApiModule, ToastModule.forRoot(), BsDatepickerModule.forRoot() ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.spec.ts index fb28571c53d8..9cc2b82a2c29 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.spec.ts @@ -5,7 +5,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { CephfsService } from '../../../shared/api/cephfs.service'; import { SharedModule } from '../../../shared/shared.module'; import { CephfsClientsComponent } from './cephfs-clients.component'; @@ -20,8 +19,7 @@ describe('CephfsClientsComponent', () => { SharedModule, HttpClientTestingModule ], - declarations: [CephfsClientsComponent], - providers: [CephfsService] + declarations: [CephfsClientsComponent] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.spec.ts index 77f064814932..07862a062b8c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.spec.ts @@ -3,13 +3,11 @@ import { Component, Input } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ChartsModule } from 'ng2-charts/ng2-charts'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { CephfsService } from '../../../shared/api/cephfs.service'; import { SharedModule } from '../../../shared/shared.module'; import { CephfsDetailComponent } from './cephfs-detail.component'; @@ -32,15 +30,13 @@ describe('CephfsDetailComponent', () => { configureTestBed({ imports: [ SharedModule, - ChartsModule, RouterTestingModule, BsDropdownModule.forRoot(), ProgressbarModule.forRoot(), TabsModule.forRoot(), HttpClientTestingModule ], - declarations: [CephfsDetailComponent, CephfsChartStubComponent, CephfsClientsStubComponent], - providers: [CephfsService] + declarations: [CephfsDetailComponent, CephfsChartStubComponent, CephfsClientsStubComponent] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.spec.ts index a70673794451..2f85abc49af5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.spec.ts @@ -3,7 +3,6 @@ import { Component, Input } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { CephfsService } from '../../../shared/api/cephfs.service'; import { CdTableSelection } from '../../../shared/models/cd-table-selection'; import { SharedModule } from '../../../shared/shared.module'; import { CephfsListComponent } from './cephfs-list.component'; @@ -20,8 +19,7 @@ describe('CephfsListComponent', () => { configureTestBed({ imports: [SharedModule, HttpClientTestingModule], - declarations: [CephfsListComponent, CephfsDetailStubComponent], - providers: [CephfsService] + declarations: [CephfsListComponent, CephfsDetailStubComponent] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.spec.ts index 6a8b358da234..956d8ab6d9a7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.spec.ts @@ -6,7 +6,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { ConfigurationService } from '../../../shared/api/configuration.service'; import { SharedModule } from '../../../shared/shared.module'; import { ConfigurationDetailsComponent } from './configuration-details/configuration-details.component'; import { ConfigurationComponent } from './configuration.component'; @@ -17,7 +16,6 @@ describe('ConfigurationComponent', () => { configureTestBed({ declarations: [ConfigurationComponent, ConfigurationDetailsComponent], - providers: [ConfigurationService], imports: [ SharedModule, FormsModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts index 79719ea76557..4cdfc9a073dd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts @@ -6,7 +6,6 @@ import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { ComponentsModule } from '../../../shared/components/components.module'; import { Permissions } from '../../../shared/models/permissions'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; import { SharedModule } from '../../../shared/shared.module'; @@ -28,7 +27,6 @@ describe('HostsComponent', () => { SharedModule, HttpClientTestingModule, TabsModule.forRoot(), - ComponentsModule, BsDropdownModule.forRoot(), RouterTestingModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.spec.ts index aefccaa79100..bbab68c09250 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.spec.ts @@ -8,7 +8,6 @@ import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed } from '../../../../../testing/unit-test-helper'; import { OsdService } from '../../../../shared/api/osd.service'; -import { DataTableModule } from '../../../../shared/datatable/datatable.module'; import { CdTableSelection } from '../../../../shared/models/cd-table-selection'; import { SharedModule } from '../../../../shared/shared.module'; import { PerformanceCounterModule } from '../../../performance-counter/performance-counter.module'; @@ -23,15 +22,8 @@ describe('OsdDetailsComponent', () => { let getDetailsSpy; configureTestBed({ - imports: [ - HttpClientModule, - TabsModule.forRoot(), - PerformanceCounterModule, - DataTableModule, - SharedModule - ], - declarations: [OsdDetailsComponent, OsdPerformanceHistogramComponent], - providers: [OsdService] + imports: [HttpClientModule, TabsModule.forRoot(), PerformanceCounterModule, SharedModule], + declarations: [OsdDetailsComponent, OsdPerformanceHistogramComponent] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts index b073f2ee9f57..f38575b0e9ef 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts @@ -6,13 +6,9 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed, PermissionHelper } from '../../../../../testing/unit-test-helper'; -import { ComponentsModule } from '../../../../shared/components/components.module'; -import { DataTableModule } from '../../../../shared/datatable/datatable.module'; import { TableActionsComponent } from '../../../../shared/datatable/table-actions/table-actions.component'; import { Permissions } from '../../../../shared/models/permissions'; -import { DimlessPipe } from '../../../../shared/pipes/dimless.pipe'; import { AuthStorageService } from '../../../../shared/services/auth-storage.service'; -import { FormatterService } from '../../../../shared/services/formatter.service'; import { SharedModule } from '../../../../shared/shared.module'; import { PerformanceCounterModule } from '../../../performance-counter/performance-counter.module'; import { OsdDetailsComponent } from '../osd-details/osd-details.component'; @@ -34,17 +30,11 @@ describe('OsdListComponent', () => { HttpClientModule, PerformanceCounterModule, TabsModule.forRoot(), - DataTableModule, - ComponentsModule, SharedModule, RouterTestingModule ], declarations: [OsdListComponent, OsdDetailsComponent, OsdPerformanceHistogramComponent], - providers: [ - DimlessPipe, - FormatterService, - { provide: AuthStorageService, useValue: fakeAuthStorageService } - ] + providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts index 29ee634c59ed..cfd808aaeb9e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts @@ -39,7 +39,6 @@ describe('HealthComponent', () => { }; configureTestBed({ - providers: [DashboardService], imports: [SharedModule, HttpClientTestingModule, PopoverModule.forRoot()], declarations: [ HealthComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts index 5a3a0b5cda30..b4dcd25b50b9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts @@ -7,7 +7,6 @@ import { of as observableOf } from 'rxjs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; import { RgwBucketService } from '../../../shared/api/rgw-bucket.service'; -import { RgwUserService } from '../../../shared/api/rgw-user.service'; import { SharedModule } from '../../../shared/shared.module'; import { RgwBucketFormComponent } from './rgw-bucket-form.component'; @@ -25,7 +24,7 @@ describe('RgwBucketFormComponent', () => { configureTestBed({ declarations: [RgwBucketFormComponent], imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule], - providers: [RgwUserService, { provide: RgwBucketService, useClass: MockRgwBucketService }] + providers: [{ provide: RgwBucketService, useClass: MockRgwBucketService }] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.spec.ts index 4597ba1e0458..60f9e0c13278 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.spec.ts @@ -7,7 +7,6 @@ import { ModalModule } from 'ngx-bootstrap/modal'; import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper'; -import { RgwBucketService } from '../../../shared/api/rgw-bucket.service'; import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component'; import { SharedModule } from '../../../shared/shared.module'; import { RgwBucketDetailsComponent } from '../rgw-bucket-details/rgw-bucket-details.component'; @@ -25,8 +24,7 @@ describe('RgwBucketListComponent', () => { SharedModule, TabsModule.forRoot(), HttpClientTestingModule - ], - providers: [RgwBucketService] + ] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.spec.ts index 388bcb7a96b4..96b6d81a8f6f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.spec.ts @@ -4,7 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { TabsModule } from 'ngx-bootstrap/tabs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { RgwDaemonService } from '../../../shared/api/rgw-daemon.service'; import { CdTableSelection } from '../../../shared/models/cd-table-selection'; import { SharedModule } from '../../../shared/shared.module'; import { PerformanceCounterModule } from '../../performance-counter/performance-counter.module'; @@ -16,13 +15,7 @@ describe('RgwDaemonDetailsComponent', () => { configureTestBed({ declarations: [RgwDaemonDetailsComponent], - imports: [ - SharedModule, - PerformanceCounterModule, - TabsModule.forRoot(), - HttpClientTestingModule - ], - providers: [RgwDaemonService] + imports: [SharedModule, PerformanceCounterModule, TabsModule.forRoot(), HttpClientTestingModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts index c353455fbdfb..b6d95627cabc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts @@ -19,7 +19,7 @@ describe('RgwUserFormComponent', () => { configureTestBed({ declarations: [RgwUserFormComponent], imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule], - providers: [BsModalService, RgwUserService] + providers: [BsModalService] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.spec.ts index c1ef3d92fa16..c42c10ec54fc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.spec.ts @@ -7,7 +7,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { ModalModule } from 'ngx-bootstrap/modal'; import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper'; -import { RgwUserService } from '../../../shared/api/rgw-user.service'; import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component'; import { SharedModule } from '../../../shared/shared.module'; import { RgwUserListComponent } from './rgw-user-list.component'; @@ -19,7 +18,6 @@ describe('RgwUserListComponent', () => { configureTestBed({ declarations: [RgwUserListComponent], imports: [RouterTestingModule, HttpClientTestingModule, ModalModule.forRoot(), SharedModule], - providers: [RgwUserService], schemas: [NO_ERRORS_SCHEMA] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts index e5d1c0399980..1d743b35be03 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts @@ -11,7 +11,6 @@ import { of } from 'rxjs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; import { RoleService } from '../../../shared/api/role.service'; import { ScopeService } from '../../../shared/api/scope.service'; -import { ComponentsModule } from '../../../shared/components/components.module'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; import { NotificationService } from '../../../shared/services/notification.service'; import { SharedModule } from '../../../shared/shared.module'; @@ -35,11 +34,9 @@ describe('RoleFormComponent', () => { configureTestBed( { imports: [ - [RouterTestingModule.withRoutes(routes)], + RouterTestingModule.withRoutes(routes), HttpClientTestingModule, ReactiveFormsModule, - RouterTestingModule, - ComponentsModule, ToastModule.forRoot(), SharedModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts index 55fdfa3afcfa..49b414e7b5f7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts @@ -41,10 +41,9 @@ describe('UserFormComponent', () => { configureTestBed( { imports: [ - [RouterTestingModule.withRoutes(routes)], + RouterTestingModule.withRoutes(routes), HttpClientTestingModule, ReactiveFormsModule, - RouterTestingModule, ComponentsModule, ToastModule.forRoot(), SharedModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.spec.ts index 99aa09a890a9..0c1706d7f9d2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.spec.ts @@ -4,7 +4,6 @@ import { ToastModule } from 'ng2-toastr'; import { PopoverModule } from 'ngx-bootstrap/popover'; import { configureTestBed } from '../../../../testing/unit-test-helper'; -import { NotificationService } from '../../../shared/services/notification.service'; import { SharedModule } from '../../../shared/shared.module'; import { NotificationsComponent } from './notifications.component'; @@ -14,8 +13,7 @@ describe('NotificationsComponent', () => { configureTestBed({ imports: [PopoverModule.forRoot(), SharedModule, ToastModule.forRoot()], - declarations: [NotificationsComponent], - providers: [NotificationService] + declarations: [NotificationsComponent] }); beforeEach(() => {