From: Afreen Misbah Date: Mon, 18 May 2026 15:15:45 +0000 (+0530) Subject: mgr/dashboard: fix build and test failures from ngx-toastr removal X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4507543beadedf4cf2991a5f68805a95d5fe5798;p=ceph.git mgr/dashboard: fix build and test failures from ngx-toastr removal Assisted-by: Claude Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/frontend/angular.json b/src/pybind/mgr/dashboard/frontend/angular.json index e14aeebd6595..d10f583c99b7 100644 --- a/src/pybind/mgr/dashboard/frontend/angular.json +++ b/src/pybind/mgr/dashboard/frontend/angular.json @@ -96,7 +96,6 @@ ], "styles": [ "node_modules/swagger-ui-dist/swagger-ui.css", - "node_modules/ngx-toastr/toastr.css", "src/styles.scss" ], "stylePreprocessorOptions": { diff --git a/src/pybind/mgr/dashboard/frontend/package-lock.json b/src/pybind/mgr/dashboard/frontend/package-lock.json index b360acc95445..7fa3b84a077a 100644 --- a/src/pybind/mgr/dashboard/frontend/package-lock.json +++ b/src/pybind/mgr/dashboard/frontend/package-lock.json @@ -39,10 +39,8 @@ "lodash": "4.18.1", "moment": "2.29.4", "ng-block-ui": "4.0.1", - "ng-click-outside": "9.0.1", "ng2-charts": "7.0.0", "ngx-cookie-service": "19.1.2", - "ngx-toastr": "19.0.0", "rxjs": "6.6.3", "simplebar-angular": "3.3.0", "stream-browserify": "3.0.0", @@ -26425,17 +26423,6 @@ "zone.js": ">=0.11.4" } }, - "node_modules/ng-click-outside": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ng-click-outside/-/ng-click-outside-9.0.1.tgz", - "integrity": "sha512-gqRZ2SexX3CntzO/HJuIh7aqxzc6xAhNfyM9VUrjYrorORADEbWTRA/1f7x/ChGGlXN0VtpKyZpWvYScndmsog==", - "deprecated": "ng-click-outside is no longer maintained. See https://github.com/arkon/ng-sidebar/issues/229", - "license": "MIT", - "peerDependencies": { - "@angular/common": ">=12.0.0", - "@angular/core": ">=12.0.0" - } - }, "node_modules/ng-mocks": { "version": "14.13.1", "resolved": "https://registry.npmjs.org/ng-mocks/-/ng-mocks-14.13.1.tgz", @@ -26489,20 +26476,6 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/ngx-toastr": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-19.0.0.tgz", - "integrity": "sha512-6pTnktwwWD+kx342wuMOWB4+bkyX9221pAgGz3SHOJH0/MI9erLucS8PeeJDFwbUYyh75nQ6AzVtolgHxi52dQ==", - "license": "MIT", - "dependencies": { - "tslib": "^2.3.0" - }, - "peerDependencies": { - "@angular/common": ">=16.0.0-0", - "@angular/core": ">=16.0.0-0", - "@angular/platform-browser": ">=16.0.0-0" - } - }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.spec.ts index 8ef136617def..d8e383ee78a2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.spec.ts @@ -9,7 +9,6 @@ import { By } from '@angular/platform-browser'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { Permission } from '~/app/shared/models/permissions'; import { SharedModule } from '~/app/shared/shared.module'; @@ -28,13 +27,7 @@ describe('IscsiTargetDiscoveryModalComponent', () => { configureTestBed({ declarations: [IscsiTargetDiscoveryModalComponent], - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - SharedModule, - ToastrModule.forRoot(), - RouterTestingModule - ], + imports: [HttpClientTestingModule, ReactiveFormsModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts index 4ddaea985b56..6da2c1979849 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts @@ -4,8 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { SelectOption } from '~/app/shared/components/select/select-option.model'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; import { SharedModule } from '~/app/shared/shared.module'; @@ -138,13 +136,7 @@ describe('IscsiTargetFormComponent', () => { configureTestBed({ declarations: [IscsiTargetFormComponent], - imports: [ - SharedModule, - ReactiveFormsModule, - HttpClientTestingModule, - RouterTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule], providers: [ { provide: ActivatedRoute, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.spec.ts index e69491df2eee..d89c6ff70aa3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.spec.ts @@ -4,7 +4,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { BehaviorSubject, of } from 'rxjs'; import { IscsiService } from '~/app/shared/api/iscsi.service'; @@ -35,7 +34,6 @@ describe('IscsiTargetListComponent', () => { HttpClientTestingModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), NgbNavModule ], declarations: [IscsiTargetListComponent, IscsiTabsComponent, IscsiTargetDetailsComponent], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.spec.ts index 19d43de6ddf1..9a699aa3cc1a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service'; @@ -27,7 +26,6 @@ describe('BootstrapCreateModalComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), ModalModule, InputModule, SelectModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.spec.ts index 67556b2813dd..dd3147e674b6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service'; @@ -27,7 +26,6 @@ describe('BootstrapImportModalComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), ModalModule, SelectModule, InputModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts index 9b7d3ce7da3a..5f5b21f11fc9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts @@ -5,7 +5,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule, NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service'; @@ -39,7 +38,6 @@ describe('OverviewComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), ButtonModule, InputModule, GridModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-mode-modal/pool-edit-mode-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-mode-modal/pool-edit-mode-modal.component.spec.ts index b927b961f8f6..945c92deb817 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-mode-modal/pool-edit-mode-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-mode-modal/pool-edit-mode-modal.component.spec.ts @@ -4,7 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service'; @@ -30,7 +29,6 @@ describe('PoolEditModeModalComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), ModalModule, SelectModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-peer-modal/pool-edit-peer-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-peer-modal/pool-edit-peer-modal.component.spec.ts index 0aa533cb8686..475684c887c8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-peer-modal/pool-edit-peer-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-peer-modal/pool-edit-peer-modal.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service'; @@ -28,7 +27,6 @@ describe('PoolEditPeerModalComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), ModalModule, InputModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts index bb58650398c3..112aa0093d24 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts @@ -3,8 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { MirrorHealthColorPipe } from '../mirror-health-color.pipe'; @@ -16,13 +14,7 @@ describe('PoolListComponent', () => { configureTestBed({ declarations: [PoolListComponent, MirrorHealthColorPipe], - imports: [ - BrowserAnimationsModule, - SharedModule, - HttpClientTestingModule, - RouterTestingModule, - ToastrModule.forRoot() - ] + imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, RouterTestingModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvme-subsystem-view/nvme-subsystem-view.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvme-subsystem-view/nvme-subsystem-view.component.spec.ts index 910041f7a8e5..7e6c5cba6730 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvme-subsystem-view/nvme-subsystem-view.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvme-subsystem-view/nvme-subsystem-view.component.spec.ts @@ -6,7 +6,6 @@ import { of } from 'rxjs'; import { NvmeSubsystemViewComponent } from './nvme-subsystem-view.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - describe('NvmeSubsystemViewComponent', () => { let component: NvmeSubsystemViewComponent; let fixture: ComponentFixture; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-edit-host-key-modal/nvmeof-edit-host-key-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-edit-host-key-modal/nvmeof-edit-host-key-modal.component.spec.ts index 0fdf214bfbbf..6a497e36cc3a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-edit-host-key-modal/nvmeof-edit-host-key-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-edit-host-key-modal/nvmeof-edit-host-key-modal.component.spec.ts @@ -3,7 +3,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { By } from '@angular/platform-browser'; -import { ToastrModule } from 'ngx-toastr'; + import { of, throwError } from 'rxjs'; import { SharedModule } from '~/app/shared/shared.module'; @@ -33,13 +33,7 @@ describe('NvmeofEditHostKeyModalComponent', () => { waitForAsync(() => { TestBed.configureTestingModule({ declarations: [NvmeofEditHostKeyModalComponent], - imports: [ - ReactiveFormsModule, - HttpClientTestingModule, - RouterTestingModule, - SharedModule, - ToastrModule.forRoot() - ], + imports: [ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule, SharedModule], providers: [ { provide: NvmeofService, useValue: nvmeofServiceSpy }, { provide: TaskWrapperService, useValue: taskWrapperServiceSpy }, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-group-form/nvmeof-group-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-group-form/nvmeof-group-form.component.spec.ts index 0c87cd8059a9..9af7f2ff76fa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-group-form/nvmeof-group-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-group-form/nvmeof-group-form.component.spec.ts @@ -5,7 +5,6 @@ import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testin import { Router } from '@angular/router'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; @@ -49,8 +48,7 @@ describe('NvmeofGroupFormComponent', () => { CheckboxModule, GridModule, InputModule, - SelectModule, - ToastrModule.forRoot() + SelectModule ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.spec.ts index 8ec7fbb023f8..e7f8f1f7251f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.spec.ts @@ -6,8 +6,6 @@ import { ActivatedRoute } from '@angular/router'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { of } from 'rxjs'; -import { ToastrModule } from 'ngx-toastr'; - import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { SharedModule } from '~/app/shared/shared.module'; @@ -46,8 +44,7 @@ describe('NvmeofInitiatorsFormComponent', () => { NgbTypeaheadModule, ReactiveFormsModule, RouterTestingModule, - SharedModule, - ToastrModule.forRoot() + SharedModule ] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-listeners-form/nvmeof-listeners-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-listeners-form/nvmeof-listeners-form.component.spec.ts index 24b22fe8276e..6289b6da77bb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-listeners-form/nvmeof-listeners-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-listeners-form/nvmeof-listeners-form.component.spec.ts @@ -3,8 +3,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { ToastrModule } from 'ngx-toastr'; - import { SharedModule } from '~/app/shared/shared.module'; import { NvmeofListenersFormComponent } from './nvmeof-listeners-form.component'; import { ActivatedRoute } from '@angular/router'; @@ -31,7 +29,7 @@ describe('NvmeofListenersFormComponent', () => { } } ], - imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, ToastrModule.forRoot()], + imports: [HttpClientTestingModule, RouterTestingModule, SharedModule], schemas: [CUSTOM_ELEMENTS_SCHEMA] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespace-expand-modal/nvmeof-namespace-expand-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespace-expand-modal/nvmeof-namespace-expand-modal.component.spec.ts index f5e249c6c2f7..038b8a02444a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespace-expand-modal/nvmeof-namespace-expand-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespace-expand-modal/nvmeof-namespace-expand-modal.component.spec.ts @@ -8,7 +8,6 @@ import { SharedModule } from '~/app/shared/shared.module'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { ModalModule, NumberModule } from 'carbon-components-angular'; import { of } from 'rxjs'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -49,7 +48,6 @@ describe('NvmeofNamespaceExpandModalComponent', () => { SharedModule, ReactiveFormsModule, RouterTestingModule, - ToastrModule.forRoot(), ModalModule, NumberModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.spec.ts index b2868bc43e4a..ef1785e33b66 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.spec.ts @@ -4,8 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; @@ -96,8 +94,7 @@ describe('NvmeofNamespacesFormComponent', () => { NumberModule, RadioModule, ComboBoxModule, - SelectModule, - ToastrModule.forRoot() + SelectModule ] }).compileComponents(); fixture = TestBed.createComponent(NvmeofNamespacesFormComponent); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-1/nvmeof-subsystem-step-1.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-1/nvmeof-subsystem-step-1.component.spec.ts index b1ab55127f15..70db85405803 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-1/nvmeof-subsystem-step-1.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-1/nvmeof-subsystem-step-1.component.spec.ts @@ -3,8 +3,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; @@ -37,8 +35,7 @@ describe('NvmeofSubsystemsStepOneComponent', () => { NgbTypeaheadModule, InputModule, GridModule, - ComboBoxModule, - ToastrModule.forRoot() + ComboBoxModule ], providers: [NgbActiveModal] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-2/nvmeof-subsystem-step-2.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-2/nvmeof-subsystem-step-2.component.spec.ts index f1f95c711589..11fc45c4eaf3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-2/nvmeof-subsystem-step-2.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-2/nvmeof-subsystem-step-2.component.spec.ts @@ -3,8 +3,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; @@ -31,8 +29,7 @@ describe('NvmeofSubsystemsStepTwoComponent', () => { InputModule, GridModule, RadioModule, - TagModule, - ToastrModule.forRoot() + TagModule ] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts index 315d7fca793f..d1e1a8b19a6d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts @@ -3,8 +3,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; @@ -34,8 +32,7 @@ describe('NvmeofSubsystemsStepThreeComponent', () => { GridModule, RadioModule, TagModule, - InputModule, - ToastrModule.forRoot() + InputModule ] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts index 447b709239c5..0eb8f51f0880 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts @@ -3,7 +3,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { SharedModule } from '~/app/shared/shared.module'; @@ -24,8 +23,7 @@ describe('NvmeofSubsystemsStepFourComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - GridModule, - ToastrModule.forRoot() + GridModule ] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts index b4e46bc97e1c..0ea20095816a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts @@ -4,8 +4,6 @@ import { ActivatedRoute } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { SharedModule } from '~/app/shared/shared.module'; @@ -74,7 +72,6 @@ describe('NvmeofSubsystemsFormComponent', () => { GridModule, RadioModule, TagModule, - ToastrModule.forRoot(), ComboBoxModule ] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.spec.ts index a1d9872ebd79..29a37b3b7521 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.spec.ts @@ -5,7 +5,6 @@ import { By } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { NEVER, of } from 'rxjs'; import { delay } from 'rxjs/operators'; @@ -63,7 +62,6 @@ describe('RbdFormComponent', () => { HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, - ToastrModule.forRoot(), SharedModule, CheckboxModule, InputModule, 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 c775333a4074..9d9258713530 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 @@ -5,7 +5,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { BehaviorSubject, of } from 'rxjs'; import { RbdService } from '~/app/shared/api/rbd.service'; @@ -39,7 +39,6 @@ describe('RbdListComponent', () => { SharedModule, NgbNavModule, NgbTooltipModule, - ToastrModule.forRoot(), RouterTestingModule, HttpClientTestingModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts index 8300fc6551ea..bb33624b32d2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts @@ -4,7 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { ComponentsModule } from '~/app/shared/components/components.module'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; @@ -16,13 +15,7 @@ describe('RbdNamespaceFormModalComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - ReactiveFormsModule, - ComponentsModule, - HttpClientTestingModule, - ToastrModule.forRoot(), - RouterTestingModule - ], + imports: [ReactiveFormsModule, ComponentsModule, HttpClientTestingModule, RouterTestingModule], declarations: [RbdNamespaceFormModalComponent], providers: [NgbActiveModal, AuthStorageService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.spec.ts index 85f8d3f81db6..c8ff6d59374b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.spec.ts @@ -4,7 +4,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { TaskListService } from '~/app/shared/services/task-list.service'; import { SharedModule } from '~/app/shared/shared.module'; @@ -23,7 +22,6 @@ describe('RbdNamespaceListComponent', () => { SharedModule, HttpClientTestingModule, RouterTestingModule, - ToastrModule.forRoot(), NgbNavModule ], providers: [TaskListService] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts index f68173d97714..bdeefe34b4da 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts @@ -4,7 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { ComponentsModule } from '~/app/shared/components/components.module'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; @@ -26,7 +25,6 @@ describe('RbdSnapshotFormModalComponent', () => { ComponentsModule, PipesModule, HttpClientTestingModule, - ToastrModule.forRoot(), RouterTestingModule, ModalModule, InputModule, 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 394abc79f26d..6d688ea61338 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 @@ -5,7 +5,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { MockComponent } from 'ng-mocks'; -import { ToastrModule } from 'ngx-toastr'; + import { Subject, throwError as observableThrowError } from 'rxjs'; import { RbdService } from '~/app/shared/api/rbd.service'; @@ -69,7 +69,6 @@ describe('RbdSnapshotListComponent', () => { PipesModule, RouterTestingModule, NgbNavModule, - ToastrModule.forRoot(), ModalModule, PlaceholderModule, CoreModule 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 29841972868b..9ffdcd1cae48 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 @@ -7,7 +7,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import moment from 'moment'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { RbdService } from '~/app/shared/api/rbd.service'; @@ -35,8 +35,7 @@ describe('RbdTrashListComponent', () => { RouterTestingModule, SharedModule, NgbNavModule, - PipesModule, - ToastrModule.forRoot() + PipesModule ], providers: [TaskListService] }); 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 3816601f781a..276deb3f5169 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 @@ -5,7 +5,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; import moment from 'moment'; -import { ToastrModule } from 'ngx-toastr'; import { NotificationService } from '~/app/shared/services/notification.service'; import { SharedModule } from '~/app/shared/shared.module'; @@ -30,7 +29,6 @@ describe('RbdTrashMoveModalComponent', () => { HttpClientTestingModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), NgbPopoverModule, ModalModule, CheckboxModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-purge-modal/rbd-trash-purge-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-purge-modal/rbd-trash-purge-modal.component.spec.ts index 162cbe559c04..e065f6a94aed 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-purge-modal/rbd-trash-purge-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-purge-modal/rbd-trash-purge-modal.component.spec.ts @@ -8,7 +8,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { Permission } from '~/app/shared/models/permissions'; import { NotificationService } from '~/app/shared/services/notification.service'; @@ -27,7 +26,6 @@ describe('RbdTrashPurgeModalComponent', () => { HttpClientTestingModule, ReactiveFormsModule, SharedModule, - ToastrModule.forRoot(), RouterTestingModule, ModalModule, SelectModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-restore-modal/rbd-trash-restore-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-restore-modal/rbd-trash-restore-modal.component.spec.ts index 850dd159572b..44fe43d1f4cd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-restore-modal/rbd-trash-restore-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-restore-modal/rbd-trash-restore-modal.component.spec.ts @@ -7,8 +7,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { NotificationService } from '~/app/shared/services/notification.service'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -24,7 +22,6 @@ describe('RbdTrashRestoreModalComponent', () => { imports: [ ReactiveFormsModule, HttpClientTestingModule, - ToastrModule.forRoot(), SharedModule, RouterTestingModule, InputModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-auth-modal/cephfs-auth-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-auth-modal/cephfs-auth-modal.component.spec.ts index 051acb6114e2..f8c755cc0ff7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-auth-modal/cephfs-auth-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-auth-modal/cephfs-auth-modal.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsAuthModalComponent } from './cephfs-auth-modal.component'; import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { SharedModule } from '~/app/shared/shared.module'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; @@ -20,7 +19,6 @@ describe('CephfsAuthModalComponent', () => { HttpClientTestingModule, SharedModule, ReactiveFormsModule, - ToastrModule.forRoot(), RouterTestingModule, NgbTypeaheadModule, ModalModule, 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 00a6e825333e..0d919e1cc844 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 @@ -2,8 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { ToastrModule } from 'ngx-toastr'; - import { TableStatusViewCache } from '~/app/shared/classes/table-status-view-cache'; import { TableActionsComponent } from '~/app/shared/datatable/table-actions/table-actions.component'; import { ViewCacheStatus } from '~/app/shared/enum/view-cache-status.enum'; @@ -16,12 +14,7 @@ describe('CephfsClientsComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - BrowserAnimationsModule, - ToastrModule.forRoot(), - SharedModule, - HttpClientTestingModule - ], + imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule], declarations: [CephfsClientsComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts index 08751aee17db..907be9cd5b8d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts @@ -6,7 +6,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TreeViewComponent, TreeviewModule } from 'carbon-components-angular'; import { NgbActiveModal, NgbModalModule, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { Observable, of } from 'rxjs'; import _ from 'lodash'; @@ -393,7 +393,6 @@ describe('CephfsDirectoriesComponent', () => { SharedModule, RouterTestingModule, TreeviewModule, - ToastrModule.forRoot(), NgbModalModule ], declarations: [CephfsDirectoriesComponent], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.spec.ts index 6d6e61c8f8eb..7bb3d2a625d8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.spec.ts @@ -5,7 +5,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { CephfsVolumeFormComponent } from './cephfs-form.component'; import { FormHelper, configureTestBed } from '~/testing/unit-test-helper'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { ReactiveFormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { OrchestratorService } from '~/app/shared/api/orchestrator.service'; @@ -31,7 +31,6 @@ describe('CephfsVolumeFormComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), GridModule, InputModule, SelectModule, 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 bd228b018c95..3d177ca1aaf6 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 @@ -4,8 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { CdTableSelection } from '~/app/shared/models/cd-table-selection'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -28,13 +26,7 @@ describe('CephfsListComponent', () => { let cephfsService: CephfsService; configureTestBed({ - imports: [ - BrowserAnimationsModule, - SharedModule, - HttpClientTestingModule, - ToastrModule.forRoot(), - RouterTestingModule - ], + imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, RouterTestingModule], declarations: [CephfsListComponent, CephfsTabsStubComponent, CephfsVolumeFormComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-mount-details/cephfs-mount-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-mount-details/cephfs-mount-details.component.spec.ts index 141ae428bdd7..9e0612bef63a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-mount-details/cephfs-mount-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-mount-details/cephfs-mount-details.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsMountDetailsComponent } from './cephfs-mount-details.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -14,7 +14,7 @@ describe('CephfsSnapshotscheduleListComponent', () => { configureTestBed({ declarations: [CephfsMountDetailsComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-form/cephfs-snapshotschedule-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-form/cephfs-snapshotschedule-form.component.spec.ts index 5451f3edaea1..64f9eaaa436e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-form/cephfs-snapshotschedule-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-form/cephfs-snapshotschedule-form.component.spec.ts @@ -8,7 +8,7 @@ import { } from '@angular/core/testing'; import { CephfsSnapshotscheduleFormComponent } from './cephfs-snapshotschedule-form.component'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { RouterTestingModule } from '@angular/router/testing'; import { ReactiveFormsModule } from '@angular/forms'; @@ -34,7 +34,6 @@ describe('CephfsSnapshotscheduleFormComponent', () => { providers: [ModalService, { provide: 'fsName', useValue: 'test_fs' }], imports: [ SharedModule, - ToastrModule.forRoot(), ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-list/cephfs-snapshotschedule-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-list/cephfs-snapshotschedule-list.component.spec.ts index a20972f1cf85..be355524e688 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-list/cephfs-snapshotschedule-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-snapshotschedule-list/cephfs-snapshotschedule-list.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsSnapshotscheduleListComponent } from './cephfs-snapshotschedule-list.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -14,7 +14,7 @@ describe('CephfsSnapshotscheduleListComponent', () => { configureTestBed({ declarations: [CephfsSnapshotscheduleListComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.spec.ts index abcaa1e0af47..3ab4c467bc85 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.spec.ts @@ -4,7 +4,7 @@ import { of } from 'rxjs'; import { CephfsSubvolumeFormComponent } from './cephfs-subvolume-form.component'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { RouterTestingModule } from '@angular/router/testing'; import { ReactiveFormsModule } from '@angular/forms'; @@ -25,7 +25,6 @@ describe('CephfsSubvolumeFormComponent', () => { providers: [NgbActiveModal], imports: [ SharedModule, - ToastrModule.forRoot(), ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-group/cephfs-subvolume-group.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-group/cephfs-subvolume-group.component.spec.ts index 0d84a131b3e9..5a575d927aae 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-group/cephfs-subvolume-group.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-group/cephfs-subvolume-group.component.spec.ts @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsSubvolumeGroupComponent } from './cephfs-subvolume-group.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { RouterTestingModule } from '@angular/router/testing'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -13,7 +12,7 @@ describe('CephfsSubvolumeGroupComponent', () => { configureTestBed({ declarations: [CephfsSubvolumeGroupComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule] + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.spec.ts index 5adc9e645d59..95e7dffd1804 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsSubvolumeListComponent } from './cephfs-subvolume-list.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -14,7 +14,7 @@ describe('CephfsSubvolumeListComponent', () => { configureTestBed({ declarations: [CephfsSubvolumeListComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-form/cephfs-subvolume-snapshots-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-form/cephfs-subvolume-snapshots-form.component.spec.ts index 95b717994c21..0f932565ece3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-form/cephfs-subvolume-snapshots-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-form/cephfs-subvolume-snapshots-form.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsSubvolumeSnapshotsFormComponent } from './cephfs-subvolume-snapshots-form.component'; import { configureTestBed } from '~/testing/unit-test-helper'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { ReactiveFormsModule } from '@angular/forms'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; @@ -17,7 +17,6 @@ describe('CephfsSubvolumeSnapshotsFormComponent', () => { declarations: [CephfsSubvolumeSnapshotsFormComponent], imports: [ SharedModule, - ToastrModule.forRoot(), ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-list.component.spec.ts index c69f916c2c16..1d03cf2a8bca 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-list.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsSubvolumeSnapshotsListComponent } from './cephfs-subvolume-snapshots-list.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; describe('CephfsSubvolumeSnapshotsListComponent', () => { let component: CephfsSubvolumeSnapshotsListComponent; @@ -12,7 +11,7 @@ describe('CephfsSubvolumeSnapshotsListComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [CephfsSubvolumeSnapshotsListComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()] + imports: [HttpClientTestingModule, SharedModule] }).compileComponents(); fixture = TestBed.createComponent(CephfsSubvolumeSnapshotsListComponent); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolumegroup-form/cephfs-subvolumegroup-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolumegroup-form/cephfs-subvolumegroup-form.component.spec.ts index 30cfe603ea02..32163a5a5353 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolumegroup-form/cephfs-subvolumegroup-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolumegroup-form/cephfs-subvolumegroup-form.component.spec.ts @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CephfsSubvolumegroupFormComponent } from './cephfs-subvolumegroup-form.component'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ReactiveFormsModule } from '@angular/forms'; @@ -19,7 +19,6 @@ describe('CephfsSubvolumegroupFormComponent', () => { providers: [NgbActiveModal], imports: [ SharedModule, - ToastrModule.forRoot(), ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts index 3fb2c4194099..1679e6173726 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts @@ -4,7 +4,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { CephfsService } from '~/app/shared/api/cephfs.service'; @@ -78,7 +78,7 @@ describe('CephfsTabsComponent', () => { } configureTestBed({ - imports: [SharedModule, NgbNavModule, HttpClientTestingModule, ToastrModule.forRoot()], + imports: [SharedModule, NgbNavModule, HttpClientTestingModule], declarations: [ CephfsTabsComponent, CephfsChartStubComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.spec.ts index 6ec2dac45cc1..fc5b96c5047c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.spec.ts @@ -3,8 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { ConfigFormModel } from '~/app/shared/components/config-option/config-option.model'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -15,13 +13,7 @@ describe('ConfigurationFormComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - RouterTestingModule, - ToastrModule.forRoot(), - SharedModule - ], + imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule], declarations: [ConfigurationFormComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.spec.ts index 94d3dd9d69d1..d224b5dfd3bc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.spec.ts @@ -2,7 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; import { CephModule } from '~/app/ceph/ceph.module'; import { CoreModule } from '~/app/core/core.module'; @@ -15,7 +14,7 @@ describe('CreateClusterReviewComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), CephModule, CoreModule] + imports: [HttpClientTestingModule, SharedModule, CephModule, CoreModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.spec.ts index e5797c827d9f..01e9c6aa2a99 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.spec.ts @@ -3,8 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { CephModule } from '~/app/ceph/ceph.module'; import { CoreModule } from '~/app/core/core.module'; import { HostService } from '~/app/shared/api/host.service'; @@ -27,14 +25,7 @@ describe('CreateClusterComponent', () => { const projectConstants: typeof AppConstants = AppConstants; configureTestBed({ - imports: [ - HttpClientTestingModule, - RouterTestingModule, - ToastrModule.forRoot(), - SharedModule, - CoreModule, - CephModule - ] + imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, CoreModule, CephModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.spec.ts index 8d632cc2bd3f..59c6666e3747 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.spec.ts @@ -3,8 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { CephModule } from '~/app/ceph/ceph.module'; import { CephSharedModule } from '~/app/ceph/shared/ceph-shared.module'; import { CoreModule } from '~/app/core/core.module'; @@ -25,8 +23,7 @@ describe('HostDetailsComponent', () => { CephModule, CoreModule, CephSharedModule, - SharedModule, - ToastrModule.forRoot() + SharedModule ] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.spec.ts index 97194e74fd41..41c1b19db48e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.spec.ts @@ -4,7 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed, FormHelper } from '~/testing/unit-test-helper'; @@ -22,7 +21,6 @@ describe('HostFormComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), InputModule, ModalModule ], 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 e29d31bc68c3..c1ce3f7efab3 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 @@ -4,7 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { CephModule } from '~/app/ceph/ceph.module'; @@ -62,7 +61,6 @@ describe('HostsComponent', () => { SharedModule, HttpClientTestingModule, RouterTestingModule, - ToastrModule.forRoot(), CephModule, CoreModule, TagModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts index 95353ecefc67..c872dff6f97d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts @@ -5,8 +5,6 @@ import { By } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { HostService } from '~/app/shared/api/host.service'; import { OrchestratorService } from '~/app/shared/api/orchestrator.service'; import { TableActionsComponent } from '~/app/shared/datatable/table-actions/table-actions.component'; @@ -48,8 +46,7 @@ describe('InventoryDevicesComponent', () => { FormsModule, HttpClientTestingModule, SharedModule, - RouterTestingModule, - ToastrModule.forRoot() + RouterTestingModule ], providers: [ { provide: AuthStorageService, useValue: fakeAuthStorageService }, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.spec.ts index dd60f7959fd9..be22f3b89fd7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.spec.ts @@ -4,7 +4,6 @@ import { FormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { HostService } from '~/app/shared/api/host.service'; @@ -26,8 +25,7 @@ describe('InventoryComponent', () => { FormsModule, SharedModule, HttpClientTestingModule, - RouterTestingModule, - ToastrModule.forRoot() + RouterTestingModule ], declarations: [InventoryComponent, InventoryDevicesComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.spec.ts index 69c6051d2d3d..5b16c9a3a0c1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { NgbDatepickerModule, NgbNavModule, NgbTimepickerModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { LogsService } from '~/app/shared/api/logs.service'; @@ -24,8 +24,7 @@ describe('LogsComponent', () => { SharedModule, FormsModule, NgbDatepickerModule, - NgbTimepickerModule, - ToastrModule.forRoot() + NgbTimepickerModule ], declarations: [LogsComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-details/mgr-module-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-details/mgr-module-details.component.spec.ts index 9793ef37ff8f..4b3ea971b120 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-details/mgr-module-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-details/mgr-module-details.component.spec.ts @@ -4,7 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { MgrModuleDetailsComponent } from './mgr-module-details.component'; -import { ToastrModule } from 'ngx-toastr'; describe('MgrModuleDetailsComponent', () => { let component: MgrModuleDetailsComponent; @@ -12,7 +11,7 @@ describe('MgrModuleDetailsComponent', () => { configureTestBed({ declarations: [MgrModuleDetailsComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()] + imports: [HttpClientTestingModule, SharedModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.spec.ts index 9f7762ceb741..fd58fadb5f3d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.spec.ts @@ -3,8 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { MgrModuleFormComponent } from './mgr-module-form.component'; @@ -15,13 +13,7 @@ describe('MgrModuleFormComponent', () => { configureTestBed({ declarations: [MgrModuleFormComponent], - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - RouterTestingModule, - SharedModule, - ToastrModule.forRoot() - ] + imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.spec.ts index 0ce36eba01af..68fad64f689a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.spec.ts @@ -4,7 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf, throwError as observableThrowError } from 'rxjs'; import { MgrModuleService } from '~/app/shared/api/mgr-module.service'; @@ -28,8 +28,7 @@ describe('MgrModuleListComponent', () => { RouterTestingModule, SharedModule, HttpClientTestingModule, - NgbNavModule, - ToastrModule.forRoot() + NgbNavModule ], providers: [MgrModuleService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-form/multi-cluster-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-form/multi-cluster-form.component.spec.ts index fada4f33f4fe..894bf35fcdc2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-form/multi-cluster-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-form/multi-cluster-form.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { MultiClusterFormComponent } from './multi-cluster-form.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { NotificationService } from '~/app/shared/services/notification.service'; import { CdDatePipe } from '~/app/shared/pipes/cd-date.pipe'; import { CommonModule, DatePipe } from '@angular/common'; @@ -28,8 +28,7 @@ describe('MultiClusterFormComponent', () => { InputModule, SelectModule, RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() + HttpClientTestingModule ], declarations: [MultiClusterFormComponent], providers: [NgbActiveModal, NotificationService, CdDatePipe, DatePipe] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-list/multi-cluster-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-list/multi-cluster-list.component.spec.ts index 0a4c33eaecd8..17991bde90d5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-list/multi-cluster-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster-list/multi-cluster-list.component.spec.ts @@ -1,6 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { MultiClusterListComponent } from './multi-cluster-list.component'; @@ -15,7 +14,7 @@ describe('MultiClusterListComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, ToastrModule.forRoot(), NgbNavModule, SharedModule], + imports: [HttpClientTestingModule, NgbNavModule, SharedModule], declarations: [MultiClusterListComponent], providers: [CdDatePipe, TableActionsComponent, { provide: ActivatedRoute, useValue: {} }] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster.component.spec.ts index f6c2291e335f..ad210968aa5b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster.component.spec.ts @@ -4,7 +4,6 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { MultiClusterComponent } from './multi-cluster.component'; import { SharedModule } from '~/app/shared/shared.module'; import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe'; -import { ToastrModule } from 'ngx-toastr'; describe('MultiClusterComponent', () => { let component: MultiClusterComponent; @@ -12,7 +11,7 @@ describe('MultiClusterComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()], + imports: [HttpClientTestingModule, SharedModule], declarations: [MultiClusterComponent], providers: [NgbActiveModal, DimlessBinaryPipe] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.spec.ts index cc2db7411594..729c57ba3619 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.spec.ts @@ -4,7 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -15,13 +14,7 @@ describe('OsdCreationPreviewModalComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - SharedModule, - RouterTestingModule, - ToastrModule.forRoot() - ], + imports: [HttpClientTestingModule, ReactiveFormsModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal], declarations: [OsdCreationPreviewModalComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.spec.ts index dea6746cf951..8e6b1e9865c4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.spec.ts @@ -4,8 +4,6 @@ import { FormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { InventoryDevice } from '~/app/ceph/cluster/inventory/inventory-devices/inventory-device.model'; import { InventoryDevicesComponent } from '~/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component'; import { SharedModule } from '~/app/shared/shared.module'; @@ -35,7 +33,6 @@ describe('OsdDevicesSelectionGroupsComponent', () => { FormsModule, HttpClientTestingModule, SharedModule, - ToastrModule.forRoot(), RouterTestingModule ], declarations: [OsdDevicesSelectionGroupsComponent, InventoryDevicesComponent] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.spec.ts index 60ef65d0517c..be22f33f98c9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.spec.ts @@ -5,7 +5,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { InventoryDevice } from '~/app/ceph/cluster/inventory/inventory-devices/inventory-device.model'; import { InventoryDevicesComponent } from '~/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component'; @@ -34,8 +33,7 @@ describe('OsdDevicesSelectionModalComponent', () => { HttpClientTestingModule, SharedModule, ReactiveFormsModule, - RouterTestingModule, - ToastrModule.forRoot() + RouterTestingModule ], providers: [NgbActiveModal], declarations: [OsdDevicesSelectionModalComponent, InventoryDevicesComponent] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-indiv-modal/osd-flags-indiv-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-indiv-modal/osd-flags-indiv-modal.component.spec.ts index 78096e6bdbdc..3232fe07d9f4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-indiv-modal/osd-flags-indiv-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-indiv-modal/osd-flags-indiv-modal.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { ModalService, TooltipModule } from 'carbon-components-angular'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf } from 'rxjs'; import { OsdService } from '~/app/shared/api/osd.service'; @@ -26,7 +26,6 @@ describe('OsdFlagsIndivModalComponent', () => { HttpClientTestingModule, ReactiveFormsModule, SharedModule, - ToastrModule.forRoot(), TooltipModule, RouterTestingModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts index 14223dd715ef..a62131a5c543 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts @@ -5,7 +5,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { ModalService } from 'carbon-components-angular'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; import { NotificationType } from '~/app/shared/enum/notification-type.enum'; import { NotificationService } from '~/app/shared/services/notification.service'; @@ -26,13 +25,7 @@ describe('OsdFlagsModalComponent', () => { let httpTesting: HttpTestingController; configureTestBed({ - imports: [ - ReactiveFormsModule, - SharedModule, - HttpClientTestingModule, - RouterTestingModule, - ToastrModule.forRoot() - ], + imports: [ReactiveFormsModule, SharedModule, HttpClientTestingModule, RouterTestingModule], declarations: [OsdFlagsModalComponent], providers: [ModalService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.spec.ts index 6511de1cd11d..9cd09bfa2a74 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.spec.ts @@ -4,7 +4,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { BehaviorSubject, of } from 'rxjs'; import { InventoryDevice } from '~/app/ceph/cluster/inventory/inventory-devices/inventory-device.model'; @@ -141,8 +140,7 @@ describe('OsdFormComponent', () => { FormsModule, SharedModule, RouterTestingModule, - ReactiveFormsModule, - ToastrModule.forRoot() + ReactiveFormsModule ], declarations: [OsdFormComponent, OsdDevicesSelectionGroupsComponent, InventoryDevicesComponent] }); 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 f43c5108ce73..21f3b36dea5d 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 @@ -7,7 +7,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { EMPTY, of } from 'rxjs'; import { CephModule } from '~/app/ceph/ceph.module'; @@ -99,7 +99,6 @@ describe('OsdListComponent', () => { BrowserAnimationsModule, HttpClientTestingModule, PerformanceCounterModule, - ToastrModule.forRoot(), CephModule, ReactiveFormsModule, NgbDropdownModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-pg-scrub-modal/osd-pg-scrub-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-pg-scrub-modal/osd-pg-scrub-modal.component.spec.ts index dc5fc1644b37..027ccb7d631a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-pg-scrub-modal/osd-pg-scrub-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-pg-scrub-modal/osd-pg-scrub-modal.component.spec.ts @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf } from 'rxjs'; import { ConfigurationService } from '~/app/shared/api/configuration.service'; @@ -21,13 +21,7 @@ describe('OsdPgScrubModalComponent', () => { let configurationService: ConfigurationService; configureTestBed({ - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - RouterTestingModule, - SharedModule, - ToastrModule.forRoot() - ], + imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule], declarations: [OsdPgScrubModalComponent], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts index f8b72940b5a3..5290f4bd1a77 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts @@ -5,7 +5,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf } from 'rxjs'; import { ConfigurationService } from '~/app/shared/api/configuration.service'; @@ -19,13 +19,7 @@ describe('OsdRecvSpeedModalComponent', () => { let configurationService: ConfigurationService; configureTestBed({ - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - RouterTestingModule, - SharedModule, - ToastrModule.forRoot() - ], + imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule], declarations: [OsdRecvSpeedModalComponent], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.spec.ts index a5ecebe9b4f3..72fb3c883bbe 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.spec.ts @@ -4,7 +4,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { CephModule } from '~/app/ceph/ceph.module'; import { ClusterModule } from '~/app/ceph/cluster/cluster.module'; @@ -26,7 +25,6 @@ describe('ActiveAlertListComponent', () => { HttpClientTestingModule, NgbNavModule, RouterTestingModule, - ToastrModule.forRoot(), SharedModule, ClusterModule, CephModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/rules-list/rules-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/rules-list/rules-list.component.spec.ts index ada139e6d1d0..c54bed65049f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/rules-list/rules-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/rules-list/rules-list.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { PrometheusService } from '~/app/shared/api/prometheus.service'; import { SettingsService } from '~/app/shared/api/settings.service'; @@ -18,13 +17,7 @@ describe('RulesListComponent', () => { configureTestBed({ declarations: [RulesListComponent, PrometheusTabsComponent], - imports: [ - HttpClientTestingModule, - SharedModule, - NgbNavModule, - RouterTestingModule, - ToastrModule.forRoot() - ], + imports: [HttpClientTestingModule, SharedModule, NgbNavModule, RouterTestingModule], providers: [PrometheusService, SettingsService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts index 2080dc8c6465..821560d792b7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts @@ -7,7 +7,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; import moment from 'moment'; -import { ToastrModule } from 'ngx-toastr'; + import { of, throwError } from 'rxjs'; import { DashboardNotFoundError } from '~/app/core/error/error'; @@ -62,7 +62,6 @@ describe('SilenceFormComponent', () => { HttpClientTestingModule, RouterTestingModule.withRoutes(routes), SharedModule, - ToastrModule.forRoot(), NgbTooltipModule, NgbPopoverModule, ReactiveFormsModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.spec.ts index 7fdf0d37b53f..be93bb5f42e8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.spec.ts @@ -4,7 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { PrometheusService } from '~/app/shared/api/prometheus.service'; @@ -31,7 +31,6 @@ describe('SilenceListComponent', () => { imports: [ BrowserAnimationsModule, SharedModule, - ToastrModule.forRoot(), RouterTestingModule, HttpClientTestingModule, NgbNavModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts index 3b7f0cb1dcba..5f6366d04b50 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts @@ -4,7 +4,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import _ from 'lodash'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; -import { ToastrModule } from 'ngx-toastr'; + import { Observable, of } from 'rxjs'; import { CephModule } from '~/app/ceph/ceph.module'; @@ -136,14 +136,7 @@ describe('ServiceDaemonListComponent', () => { }; configureTestBed({ - imports: [ - HttpClientTestingModule, - CephModule, - CoreModule, - PipesModule, - SharedModule, - ToastrModule.forRoot() - ] + imports: [HttpClientTestingModule, CephModule, CoreModule, PipesModule, SharedModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-details/service-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-details/service-details.component.spec.ts index bd40b9e5dc3e..7a099c100a6f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-details/service-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-details/service-details.component.spec.ts @@ -4,7 +4,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; -import { ToastrModule } from 'ngx-toastr'; import { CdTableSelection } from '~/app/shared/models/cd-table-selection'; import { SummaryService } from '~/app/shared/services/summary.service'; @@ -23,8 +22,7 @@ describe('ServiceDetailsComponent', () => { RouterTestingModule, SharedModule, NgbNavModule, - PipesModule, - ToastrModule.forRoot() + PipesModule ], declarations: [ServiceDetailsComponent, ServiceDaemonListComponent], providers: [{ provide: SummaryService, useValue: { subscribeOnce: jest.fn() } }] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts index bfd6cd4a627e..6ffd5be14c65 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts @@ -6,7 +6,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { CephServiceService } from '~/app/shared/api/ceph-service.service'; @@ -55,7 +55,6 @@ describe('ServiceFormComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), InputModule, SelectModule, NumberModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.spec.ts index 094a3cef1385..bd1ebd36e802 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.spec.ts @@ -4,7 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { CephModule } from '~/app/ceph/ceph.module'; @@ -58,8 +57,7 @@ describe('ServicesComponent', () => { CoreModule, SharedModule, HttpClientTestingModule, - RouterTestingModule, - ToastrModule.forRoot() + RouterTestingModule ], providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts index 576a6f0e64f0..bb3b8afd47ed 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf } from 'rxjs'; import { MgrModuleService } from '~/app/shared/api/mgr-module.service'; @@ -46,13 +46,7 @@ describe('TelemetryComponent', () => { configureTestBed({ declarations: [TelemetryComponent], - imports: [ - HttpClientTestingModule, - ReactiveFormsModule, - RouterTestingModule, - SharedModule, - ToastrModule.forRoot() - ] + imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule] }); describe('configForm', () => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.spec.ts index 1fe7ffbf8095..fe5b1f9f663d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-form/upgrade-start-modal.component.spec.ts @@ -6,7 +6,7 @@ import { UpgradeService } from '~/app/shared/api/upgrade.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; describe('UpgradeComponent', () => { @@ -14,7 +14,7 @@ describe('UpgradeComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], schemas: [NO_ERRORS_SCHEMA], declarations: [UpgradeComponent], providers: [UpgradeService] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.spec.ts index b96e7f453518..6fa255796410 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { UpgradeProgressComponent } from './upgrade-progress.component'; -import { ToastrModule } from 'ngx-toastr'; + import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SharedModule } from '~/app/shared/shared.module'; import { RouterTestingModule } from '@angular/router/testing'; @@ -14,7 +14,7 @@ describe('UpgradeProgressComponent', () => { configureTestBed({ declarations: [UpgradeProgressComponent, LogsComponent], - imports: [ToastrModule.forRoot(), HttpClientTestingModule, SharedModule, RouterTestingModule] + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts index 254bf26de5d4..82321f18e29a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts @@ -12,7 +12,7 @@ import { SharedModule } from '~/app/shared/shared.module'; import { LogsComponent } from '../logs/logs.component'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { ToastrModule } from 'ngx-toastr'; + import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; import { RouterTestingModule } from '@angular/router/testing'; import { VERSION_PREFIX } from '~/app/shared/constants/app.constants'; @@ -54,13 +54,7 @@ describe('UpgradeComponent', () => { }; configureTestBed({ - imports: [ - HttpClientTestingModule, - SharedModule, - NgbNavModule, - ToastrModule.forRoot(), - RouterTestingModule - ], + imports: [HttpClientTestingModule, SharedModule, NgbNavModule, RouterTestingModule], declarations: [UpgradeComponent, LogsComponent], schemas: [NO_ERRORS_SCHEMA], providers: [UpgradeService, { provide: SummaryService, useClass: SummaryServiceMock }] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-cluster-details/nfs-cluster-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-cluster-details/nfs-cluster-details.component.spec.ts index b0f4176a0227..2e529087b609 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-cluster-details/nfs-cluster-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-cluster-details/nfs-cluster-details.component.spec.ts @@ -3,7 +3,6 @@ import { NfsClusterDetailsComponent } from './nfs-cluster-details.component'; import { configureTestBed } from '~/testing/unit-test-helper'; import { SharedModule } from '~/app/shared/shared.module'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - describe('NfsClusterDetailsComponent', () => { let component: NfsClusterDetailsComponent; let fixture: ComponentFixture; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts index 7f5888f15c1c..bb64ce3af95f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts @@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { Observable, of } from 'rxjs'; import { NfsFormClientComponent } from '~/app/ceph/nfs/nfs-form-client/nfs-form-client.component'; @@ -29,7 +29,6 @@ describe('NfsFormComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), NgbTypeaheadModule ], providers: [ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.spec.ts index 91341d3b728f..5758325a8e3f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.spec.ts @@ -4,7 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { NfsService } from '~/app/shared/api/nfs.service'; @@ -37,8 +37,7 @@ describe('NfsListComponent', () => { HttpClientTestingModule, RouterTestingModule, SharedModule, - NgbNavModule, - ToastrModule.forRoot() + NgbNavModule ], providers: [TaskListService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/storage-card/overview-storage-card.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/storage-card/overview-storage-card.component.spec.ts index a3216f64dd4d..5da63a56e99e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/storage-card/overview-storage-card.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/storage-card/overview-storage-card.component.spec.ts @@ -1,6 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - import { OverviewStorageCardComponent } from './overview-storage-card.component'; import { FormatterService } from '~/app/shared/services/formatter.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.spec.ts index 1a7956280e9f..8e7aeb4645db 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { CrushRuleService } from '~/app/shared/api/crush-rule.service'; @@ -65,7 +65,7 @@ describe('CrushRuleFormComponent', () => { }; configureTestBed({ - imports: [HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot(), PoolModule], + imports: [HttpClientTestingModule, RouterTestingModule, PoolModule], providers: [CrushRuleService, NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts index c07223e65ae6..3ed8e7df2bb6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts @@ -4,7 +4,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { ErasureCodeProfileService } from '~/app/shared/api/erasure-code-profile.service'; @@ -43,7 +43,7 @@ describe('ErasureCodeProfileFormModalComponent', () => { }; configureTestBed({ - imports: [HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot(), PoolModule], + imports: [HttpClientTestingModule, RouterTestingModule, PoolModule], providers: [ErasureCodeProfileService, NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts index f2b894a4dedc..af791f8c927c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts @@ -8,7 +8,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal, NgbModalModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { Observable, of } from 'rxjs'; import { DashboardNotFoundError } from '~/app/core/error/error'; @@ -135,7 +135,6 @@ describe('PoolFormComponent', () => { BrowserAnimationsModule, HttpClientTestingModule, RouterTestingModule.withRoutes(routes), - ToastrModule.forRoot(), NgbNavModule, PoolModule, SharedModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts index bb1baff317c9..f0f009e70400 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts @@ -5,7 +5,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { RbdConfigurationListComponent } from '~/app/ceph/block/rbd-configuration-list/rbd-configuration-list.component'; @@ -49,7 +49,6 @@ describe('PoolListComponent', () => { imports: [ BrowserAnimationsModule, SharedModule, - ToastrModule.forRoot(), RouterTestingModule, NgbNavModule, HttpClientTestingModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/create-rgw-service-entities/create-rgw-service-entities.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/create-rgw-service-entities/create-rgw-service-entities.component.spec.ts index 72268ba9b3ba..d90a486461ac 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/create-rgw-service-entities/create-rgw-service-entities.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/create-rgw-service-entities/create-rgw-service-entities.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { CreateRgwServiceEntitiesComponent } from './create-rgw-service-entities.component'; @@ -14,13 +14,7 @@ describe('CreateRgwServiceEntitiesComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], providers: [NgbActiveModal], declarations: [CreateRgwServiceEntitiesComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zone-deletion-form/rgw-multisite-zone-deletion-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zone-deletion-form/rgw-multisite-zone-deletion-form.component.spec.ts index be242f8b19cb..0706a8b8605f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zone-deletion-form/rgw-multisite-zone-deletion-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zone-deletion-form/rgw-multisite-zone-deletion-form.component.spec.ts @@ -1,7 +1,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { RgwMultisiteZoneDeletionFormComponent } from './rgw-multisite-zone-deletion-form.component'; @@ -12,7 +12,7 @@ describe('RgwMultisiteZoneDeletionFormComponent', () => { configureTestBed({ declarations: [RgwMultisiteZoneDeletionFormComponent], - imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [SharedModule, HttpClientTestingModule, RouterTestingModule], providers: [] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zonegroup-deletion-form/rgw-multisite-zonegroup-deletion-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zonegroup-deletion-form/rgw-multisite-zonegroup-deletion-form.component.spec.ts index 7c325a6c91f5..226fec352bc6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zonegroup-deletion-form/rgw-multisite-zonegroup-deletion-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zonegroup-deletion-form/rgw-multisite-zonegroup-deletion-form.component.spec.ts @@ -2,7 +2,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { RgwZonegroup } from '../rgw-multisite'; @@ -15,7 +15,7 @@ describe('RgwMultisiteZonegroupDeletionFormComponent', () => { configureTestBed({ declarations: [RgwMultisiteZonegroupDeletionFormComponent], - imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [SharedModule, HttpClientTestingModule, RouterTestingModule], providers: [NgbActiveModal] }); 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 f07609a22b9e..75a3e5d0dd6c 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 @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf } from 'rxjs'; import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service'; @@ -43,7 +43,6 @@ describe('RgwBucketFormComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), SelectModule, CheckboxModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-lifecycle-list/rgw-bucket-lifecycle-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-lifecycle-list/rgw-bucket-lifecycle-list.component.spec.ts index 4aabbed98de1..e7f91e2ebb46 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-lifecycle-list/rgw-bucket-lifecycle-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-lifecycle-list/rgw-bucket-lifecycle-list.component.spec.ts @@ -4,7 +4,7 @@ import { configureTestBed } from '~/testing/unit-test-helper'; import { of } from 'rxjs'; import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service'; import { ReactiveFormsModule } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { ComponentsModule } from '~/app/shared/components/components.module'; import { InputModule, @@ -33,7 +33,6 @@ describe('RgwBucketLifecycleListComponent', () => { SelectModule, NumberModule, InputModule, - ToastrModule.forRoot(), ComponentsModule, ModalModule ], 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 121d39da0b93..d2317a07be71 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 @@ -12,7 +12,6 @@ import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed, PermissionHelper } from '~/testing/unit-test-helper'; import { RgwBucketDetailsComponent } from '../rgw-bucket-details/rgw-bucket-details.component'; import { RgwBucketListComponent } from './rgw-bucket-list.component'; -import { ToastrModule } from 'ngx-toastr'; describe('RgwBucketListComponent', () => { let component: RgwBucketListComponent; @@ -27,8 +26,7 @@ describe('RgwBucketListComponent', () => { RouterTestingModule, SharedModule, NgbNavModule, - HttpClientTestingModule, - ToastrModule.forRoot() + HttpClientTestingModule ] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-notification-list/rgw-bucket-notification-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-notification-list/rgw-bucket-notification-list.component.spec.ts index 8b806ba5ffe5..05e7213ef1c5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-notification-list/rgw-bucket-notification-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-notification-list/rgw-bucket-notification-list.component.spec.ts @@ -5,7 +5,6 @@ import { configureTestBed, PermissionHelper } from '~/testing/unit-test-helper'; import { ComponentsModule } from '~/app/shared/components/components.module'; import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service'; import { of } from 'rxjs'; -import { ToastrModule } from 'ngx-toastr'; class MockRgwBucketService { listNotification = jest.fn((bucket: string) => of([{ bucket, notifications: [] }])); @@ -19,7 +18,7 @@ describe('RgwBucketNotificationListComponent', () => { configureTestBed({ declarations: [RgwBucketNotificationListComponent], - imports: [ComponentsModule, HttpClientTestingModule, ToastrModule.forRoot()], + imports: [ComponentsModule, HttpClientTestingModule], providers: [ { provide: 'bucket', useValue: { bucket: 'bucket1', owner: 'dashboard' } }, { provide: RgwBucketService, useClass: MockRgwBucketService } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-tiering-form/rgw-bucket-tiering-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-tiering-form/rgw-bucket-tiering-form.component.spec.ts index f74065e8a0a4..6bfe176a6a08 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-tiering-form/rgw-bucket-tiering-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-tiering-form/rgw-bucket-tiering-form.component.spec.ts @@ -5,7 +5,7 @@ import { configureTestBed } from '~/testing/unit-test-helper'; import { of } from 'rxjs'; import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service'; import { ReactiveFormsModule } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { ComponentsModule } from '~/app/shared/components/components.module'; import { InputModule, @@ -37,7 +37,6 @@ describe('RgwBucketTieringFormComponent', () => { SelectModule, NumberModule, InputModule, - ToastrModule.forRoot(), ComponentsModule, ModalModule, RouterTestingModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-config-modal/rgw-config-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-config-modal/rgw-config-modal.component.spec.ts index a26661504378..60c0e724a282 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-config-modal/rgw-config-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-config-modal/rgw-config-modal.component.spec.ts @@ -4,7 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -16,13 +15,7 @@ describe('RgwConfigModalComponent', () => { configureTestBed({ declarations: [RgwConfigModalComponent], - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.spec.ts index 8beef5def21c..ed2b838eefb5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.spec.ts @@ -1,7 +1,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { DebugElement } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { RgwMultisiteDetailsComponent } from './rgw-multisite-details.component'; @@ -19,13 +19,7 @@ describe('RgwMultisiteDetailsComponent', () => { configureTestBed({ declarations: [RgwMultisiteDetailsComponent], - imports: [ - HttpClientTestingModule, - SharedModule, - ToastrModule.forRoot(), - RouterTestingModule, - NgbNavModule - ], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule, NgbNavModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.spec.ts index bca0ddfe438b..64270da9c4c2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { RgwMultisiteExportComponent } from './rgw-multisite-export.component'; @@ -14,13 +14,7 @@ describe('RgwMultisiteExportComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], declarations: [RgwMultisiteExportComponent], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.spec.ts index 817c6a4230a8..f25322385495 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { RgwMultisiteImportComponent } from './rgw-multisite-import.component'; @@ -14,13 +14,7 @@ describe('RgwMultisiteImportComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], declarations: [RgwMultisiteImportComponent], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.spec.ts index 2134e7f7c39a..b32312e0620d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.spec.ts @@ -5,7 +5,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -14,13 +14,7 @@ describe('RgwMultisiteMigrateComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], declarations: [RgwMultisiteMigrateComponent], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-realm-form/rgw-multisite-realm-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-realm-form/rgw-multisite-realm-form.component.spec.ts index 2843c8f411a3..bb922f5acc03 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-realm-form/rgw-multisite-realm-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-realm-form/rgw-multisite-realm-form.component.spec.ts @@ -6,7 +6,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; import { of as observableOf } from 'rxjs'; -import { ToastrModule } from 'ngx-toastr'; + import { RgwRealmService } from '~/app/shared/api/rgw-realm.service'; import { NotificationType } from '~/app/shared/enum/notification-type.enum'; import { NotificationService } from '~/app/shared/services/notification.service'; @@ -27,7 +27,6 @@ describe('RgwMultisiteRealmFormComponent', () => { ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule, - ToastrModule.forRoot(), ModalModule, InputModule, CheckboxModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.spec.ts index 82f42cc11217..a991659e347b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwMultisiteSyncFlowModalComponent } from './rgw-multisite-sync-flow-modal.component'; -import { ToastrModule } from 'ngx-toastr'; + import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ReactiveFormsModule } from '@angular/forms'; @@ -29,7 +29,6 @@ describe('RgwMultisiteSyncFlowModalComponent', () => { declarations: [RgwMultisiteSyncFlowModalComponent], imports: [ HttpClientTestingModule, - ToastrModule.forRoot(), PipesModule, ReactiveFormsModule, CommonModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component.spec.ts index 1e476ce91744..83ec05914f65 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component.spec.ts @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwMultisiteSyncPipeModalComponent } from './rgw-multisite-sync-pipe-modal.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; @@ -28,7 +27,6 @@ describe('RgwMultisiteSyncPipeModalComponent', () => { declarations: [RgwMultisiteSyncPipeModalComponent], imports: [ HttpClientTestingModule, - ToastrModule.forRoot(), PipesModule, ReactiveFormsModule, CommonModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-details/rgw-multisite-sync-policy-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-details/rgw-multisite-sync-policy-details.component.spec.ts index 94e8078c1c25..8533a8836d19 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-details/rgw-multisite-sync-policy-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-details/rgw-multisite-sync-policy-details.component.spec.ts @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwMultisiteSyncPolicyDetailsComponent } from './rgw-multisite-sync-policy-details.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { ModalModule } from 'carbon-components-angular'; import { SharedModule } from '~/app/shared/shared.module'; @@ -14,13 +13,7 @@ describe('RgwMultisiteSyncPolicyDetailsComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [RgwMultisiteSyncPolicyDetailsComponent], - imports: [ - HttpClientTestingModule, - ToastrModule.forRoot(), - PipesModule, - ModalModule, - SharedModule - ] + imports: [HttpClientTestingModule, PipesModule, ModalModule, SharedModule] }).compileComponents(); fixture = TestBed.createComponent(RgwMultisiteSyncPolicyDetailsComponent); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-form/rgw-multisite-sync-policy-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-form/rgw-multisite-sync-policy-form.component.spec.ts index 64ad562ef53a..333bb3736756 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-form/rgw-multisite-sync-policy-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy-form/rgw-multisite-sync-policy-form.component.spec.ts @@ -1,7 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwMultisiteSyncPolicyFormComponent } from './rgw-multisite-sync-policy-form.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { ReactiveFormsModule } from '@angular/forms'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { ComponentsModule } from '~/app/shared/components/components.module'; @@ -20,7 +19,6 @@ describe('RgwMultisiteSyncPolicyFormComponent', () => { imports: [ HttpClientTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), PipesModule, ComponentsModule, SharedModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy/rgw-multisite-sync-policy.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy/rgw-multisite-sync-policy.component.spec.ts index 2ca48c8e48ff..d4f0920b16c1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy/rgw-multisite-sync-policy.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-policy/rgw-multisite-sync-policy.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwMultisiteSyncPolicyComponent } from './rgw-multisite-sync-policy.component'; import { HttpClientModule } from '@angular/common/http'; import { TitleCasePipe } from '@angular/common'; -import { ToastrModule } from 'ngx-toastr'; + import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { ModalModule } from 'carbon-components-angular'; import { RgwMultisiteTabsComponent } from '../rgw-multisite-tabs/rgw-multisite-tabs.component'; @@ -22,14 +22,7 @@ describe('RgwMultisiteSyncPolicyComponent', () => { RgwMultisiteTabsComponent, RgwMultisiteSyncPolicyDetailsComponent ], - imports: [ - HttpClientModule, - ToastrModule.forRoot(), - PipesModule, - ModalModule, - SharedModule, - RouterTestingModule - ], + imports: [HttpClientModule, PipesModule, ModalModule, SharedModule, RouterTestingModule], providers: [TitleCasePipe] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.spec.ts index 21f36f9d0b31..1844d136970b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.spec.ts @@ -5,7 +5,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SharedModule } from '~/app/shared/shared.module'; import { ReactiveFormsModule } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core'; @@ -16,13 +16,7 @@ describe('RgwMultisiteWizardComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [RgwMultisiteWizardComponent], - imports: [ - HttpClientTestingModule, - SharedModule, - ReactiveFormsModule, - ToastrModule.forRoot(), - RouterTestingModule - ], + imports: [HttpClientTestingModule, SharedModule, ReactiveFormsModule, RouterTestingModule], schemas: [NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA], providers: [NgbActiveModal] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.spec.ts index 79b12d4d8bbd..2f09497ce099 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.spec.ts @@ -6,7 +6,7 @@ import { RgwZoneService } from '~/app/shared/api/rgw-zone.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { RgwZone } from '../models/rgw-multisite'; import { NO_ERRORS_SCHEMA } from '@angular/compiler'; @@ -28,7 +28,6 @@ describe('RgwMultisiteZoneFormComponent', () => { HttpClientTestingModule, ModalModule, InputModule, - ToastrModule.forRoot(), CheckboxModule, SelectModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zonegroup-form/rgw-multisite-zonegroup-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zonegroup-form/rgw-multisite-zonegroup-form.component.spec.ts index d7dc5e60627b..d4d1ad0de8ee 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zonegroup-form/rgw-multisite-zonegroup-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zonegroup-form/rgw-multisite-zonegroup-form.component.spec.ts @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf } from 'rxjs'; import { RgwZonegroupService } from '~/app/shared/api/rgw-zonegroup.service'; import { NotificationType } from '~/app/shared/enum/notification-type.enum'; @@ -21,13 +21,7 @@ describe('RgwMultisiteZonegroupFormComponent', () => { let rgwZonegroupService: RgwZonegroupService; configureTestBed({ - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], providers: [NgbActiveModal], declarations: [RgwMultisiteZonegroupFormComponent] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-notification-form/rgw-notification-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-notification-form/rgw-notification-form.component.spec.ts index c8aec819e746..9f16d6b40d29 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-notification-form/rgw-notification-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-notification-form/rgw-notification-form.component.spec.ts @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwNotificationFormComponent } from './rgw-notification-form.component'; import { CdLabelComponent } from '~/app/shared/components/cd-label/cd-label.component'; import { ReactiveFormsModule } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { ComponentsModule } from '~/app/shared/components/components.module'; import { InputModule, @@ -40,7 +40,6 @@ describe('RgwNotificationFormComponent', () => { SelectModule, NumberModule, InputModule, - ToastrModule.forRoot(), ComponentsModule, ModalModule, ComboBoxModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.spec.ts index de135658842f..941eabb426f9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.spec.ts @@ -13,7 +13,7 @@ import { RgwRealmService } from '~/app/shared/api/rgw-realm.service'; import { RgwZoneService } from '~/app/shared/api/rgw-zone.service'; import { RgwZonegroupService } from '~/app/shared/api/rgw-zonegroup.service'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { CommonModule } from '@angular/common'; import { ActivatedRoute } from '@angular/router'; import { VERSION_PREFIX } from '~/app/shared/constants/app.constants'; @@ -91,7 +91,7 @@ describe('RgwOverviewDashboardComponent', () => { useValue: { params: { subscribe: (fn: Function) => fn(params) } } } ], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), CommonModule] + imports: [HttpClientTestingModule, SharedModule, CommonModule] }).compileComponents(); fixture = TestBed.createComponent(RgwOverviewDashboardComponent); component = fixture.componentInstance; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-rate-limit/rgw-rate-limit.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-rate-limit/rgw-rate-limit.component.spec.ts index 2870f2b0f20e..4caa78f60b72 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-rate-limit/rgw-rate-limit.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-rate-limit/rgw-rate-limit.component.spec.ts @@ -5,7 +5,7 @@ import { AbstractControl, ReactiveFormsModule, ValidationErrors } from '@angular import { HttpClientTestingModule } from '@angular/common/http/testing'; import { FormatterService } from '~/app/shared/services/formatter.service'; import { CheckboxModule, InputModule, NotificationService } from 'carbon-components-angular'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; import { SharedModule } from '~/app/shared/shared.module'; @@ -15,14 +15,12 @@ describe('RgwRateLimitComponent', () => { configureTestBed({ imports: [ ReactiveFormsModule, - ToastrModule.forRoot(), InputModule, CheckboxModule, HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), InputModule ], declarations: [RgwRateLimitComponent], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-form/rgw-storage-class-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-form/rgw-storage-class-form.component.spec.ts index 3d50c6ea3cd6..919a19a398e3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-form/rgw-storage-class-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-form/rgw-storage-class-form.component.spec.ts @@ -4,7 +4,7 @@ import { SharedModule } from '~/app/shared/shared.module'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { ReactiveFormsModule } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { CheckboxModule, ComboBoxModule, @@ -28,7 +28,6 @@ describe('RgwStorageClassFormComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), GridModule, InputModule, CoreModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-list/rgw-storage-class-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-list/rgw-storage-class-list.component.spec.ts index 5908ada97294..1409333e9e82 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-list/rgw-storage-class-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-list/rgw-storage-class-list.component.spec.ts @@ -4,7 +4,7 @@ import { RgwStorageClassListComponent } from './rgw-storage-class-list.component import { HttpClientTestingModule } from '@angular/common/http/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { RouterTestingModule } from '@angular/router/testing'; describe('RgwStorageClassListComponent', () => { @@ -13,7 +13,7 @@ describe('RgwStorageClassListComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal], declarations: [RgwStorageClassListComponent] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-system-user/rgw-system-user.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-system-user/rgw-system-user.component.spec.ts index a08996ffd268..8eca17be7acf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-system-user/rgw-system-user.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-system-user/rgw-system-user.component.spec.ts @@ -5,7 +5,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -14,13 +14,7 @@ describe('RgwSystemUserComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [ - SharedModule, - ReactiveFormsModule, - RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() - ], + imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule], declarations: [RgwSystemUserComponent], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-form/rgw-topic-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-form/rgw-topic-form.component.spec.ts index dd6ff2fee358..eaef62c5e37f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-form/rgw-topic-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-form/rgw-topic-form.component.spec.ts @@ -8,7 +8,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ActionLabelsI18n } from '~/app/shared/constants/app.constants'; import { TextAreaJsonFormatterService } from '~/app/shared/services/text-area-json-formatter.service'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { GridModule, InputModule, SelectModule } from 'carbon-components-angular'; import { NO_ERRORS_SCHEMA } from '@angular/compiler'; @@ -40,7 +40,6 @@ describe('RgwTopicFormComponent', () => { RouterTestingModule, HttpClientTestingModule, SharedModule, - ToastrModule.forRoot(), SelectModule, GridModule, InputModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-list/rgw-topic-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-list/rgw-topic-list.component.spec.ts index 79d6b20fab22..d7224318078d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-list/rgw-topic-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-list/rgw-topic-list.component.spec.ts @@ -7,7 +7,6 @@ import { RgwTopicDetailsComponent } from '../rgw-topic-details/rgw-topic-details import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RgwTopicService } from '~/app/shared/api/rgw-topic.service'; @@ -28,7 +27,6 @@ describe('RgwTopicListComponent', () => { BrowserAnimationsModule, SharedModule, HttpClientTestingModule, - ToastrModule.forRoot(), RouterTestingModule ], declarations: [RgwTopicListComponent] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts-form/rgw-user-accounts-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts-form/rgw-user-accounts-form.component.spec.ts index 87499ce2affe..0db3d09f6b18 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts-form/rgw-user-accounts-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts-form/rgw-user-accounts-form.component.spec.ts @@ -4,7 +4,6 @@ import { RgwUserAccountsFormComponent } from './rgw-user-accounts-form.component import { ComponentsModule } from '~/app/shared/components/components.module'; import { RouterTestingModule } from '@angular/router/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { of } from 'rxjs'; import { RgwUserAccountsService } from '~/app/shared/api/rgw-user-accounts.service'; @@ -28,7 +27,6 @@ describe('RgwUserAccountsFormComponent', () => { declarations: [RgwUserAccountsFormComponent], imports: [ ComponentsModule, - ToastrModule.forRoot(), HttpClientTestingModule, PipesModule, RouterTestingModule.withRoutes([ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts/rgw-user-accounts.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts/rgw-user-accounts.component.spec.ts index ff25b3ca17e7..0f7bb866f3e7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts/rgw-user-accounts.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-accounts/rgw-user-accounts.component.spec.ts @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RgwUserAccountsComponent } from './rgw-user-accounts.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule } from 'ngx-toastr'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { RouterTestingModule } from '@angular/router/testing'; import { ComponentsModule } from '~/app/shared/components/components.module'; @@ -14,13 +13,7 @@ describe('RgwUserAccountsComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [RgwUserAccountsComponent], - imports: [ - ComponentsModule, - ToastrModule.forRoot(), - HttpClientTestingModule, - PipesModule, - RouterTestingModule - ] + imports: [ComponentsModule, HttpClientTestingModule, PipesModule, RouterTestingModule] }).compileComponents(); fixture = TestBed.createComponent(RgwUserAccountsComponent); 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 95aff3b51737..b93adfae1755 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 @@ -6,7 +6,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; -import { ToastrModule } from 'ngx-toastr'; + import { of as observableOf, throwError } from 'rxjs'; import { RgwUserService } from '~/app/shared/api/rgw-user.service'; @@ -40,7 +40,6 @@ describe('RgwUserFormComponent', () => { ReactiveFormsModule, RouterTestingModule, SharedModule, - ToastrModule.forRoot(), NgbTooltipModule, PipesModule, CheckboxModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-swift-key-modal/rgw-user-swift-key-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-swift-key-modal/rgw-user-swift-key-modal.component.spec.ts index f7ecf3290810..3e9eb6821246 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-swift-key-modal/rgw-user-swift-key-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-swift-key-modal/rgw-user-swift-key-modal.component.spec.ts @@ -3,7 +3,6 @@ import { FormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -15,7 +14,7 @@ describe('RgwUserSwiftKeyModalComponent', () => { configureTestBed({ declarations: [RgwUserSwiftKeyModalComponent], - imports: [ToastrModule.forRoot(), FormsModule, SharedModule, RouterTestingModule], + imports: [FormsModule, SharedModule, RouterTestingModule], providers: [NgbActiveModal] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/feedback/feedback.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/feedback/feedback.component.spec.ts index c82f159f5a20..c5e27b99054a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/feedback/feedback.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/feedback/feedback.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { throwError } from 'rxjs'; import { FeedbackService } from '~/app/shared/api/feedback.service'; @@ -26,7 +26,6 @@ describe('FeedbackComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), SharedModule, SelectModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-form/smb-cluster-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-form/smb-cluster-form.component.spec.ts index f115f07f43bc..6894a5c6030f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-form/smb-cluster-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-form/smb-cluster-form.component.spec.ts @@ -5,7 +5,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { SharedModule } from '~/app/shared/shared.module'; import { RouterTestingModule } from '@angular/router/testing'; import { FormArray, ReactiveFormsModule, Validators } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { ComboBoxModule, GridModule, InputModule, SelectModule } from 'carbon-components-angular'; import { AUTHMODE } from '../smb.model'; import { FOO_USERSGROUPS } from '../smb-usersgroups-form/smb-usersgroups-form.component.spec'; @@ -25,7 +25,6 @@ describe('SmbClusterFormComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), GridModule, InputModule, SelectModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-list/smb-cluster-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-list/smb-cluster-list.component.spec.ts index d1c24d1dbe10..ce050696a78f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-list/smb-cluster-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-cluster-list/smb-cluster-list.component.spec.ts @@ -6,8 +6,6 @@ import { SharedModule } from '~/app/shared/shared.module'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - describe('SmbClusterListComponent', () => { let component: SmbClusterListComponent; let fixture: ComponentFixture; @@ -18,7 +16,6 @@ describe('SmbClusterListComponent', () => { BrowserAnimationsModule, SharedModule, HttpClientTestingModule, - ToastrModule.forRoot(), RouterTestingModule ], declarations: [SmbClusterListComponent] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-domain-setting-modal/smb-domain-setting-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-domain-setting-modal/smb-domain-setting-modal.component.spec.ts index 1258cd71565e..58295c4cd2f0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-domain-setting-modal/smb-domain-setting-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-domain-setting-modal/smb-domain-setting-modal.component.spec.ts @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SmbDomainSettingModalComponent } from './smb-domain-setting-modal.component'; import { SharedModule } from '~/app/shared/shared.module'; -import { ToastrModule } from 'ngx-toastr'; + import { ReactiveFormsModule } from '@angular/forms'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; @@ -22,7 +22,6 @@ describe('SmbDomainSettingModalComponent', () => { declarations: [SmbDomainSettingModalComponent], imports: [ SharedModule, - ToastrModule.forRoot(), ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-form/smb-join-auth-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-form/smb-join-auth-form.component.spec.ts index 35cbbc6bf5a8..0dc905be42e3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-form/smb-join-auth-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-form/smb-join-auth-form.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SmbJoinAuthFormComponent } from './smb-join-auth-form.component'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; import { provideHttpClient } from '@angular/common/http'; import { provideHttpClientTesting } from '@angular/common/http/testing'; @@ -29,7 +29,7 @@ describe('SmbJoinAuthFormComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ToastrModule.forRoot(), SharedModule, ReactiveFormsModule], + imports: [SharedModule, ReactiveFormsModule], declarations: [SmbJoinAuthFormComponent], providers: [provideHttpClient(), provideHttpClientTesting(), provideRouter([])] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-list/smb-join-auth-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-list/smb-join-auth-list.component.spec.ts index d74f0ef39034..6dbafadd987a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-list/smb-join-auth-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-join-auth-list/smb-join-auth-list.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SmbJoinAuthListComponent } from './smb-join-auth-list.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; describe('SmbJoinAuthListComponent', () => { @@ -13,7 +13,7 @@ describe('SmbJoinAuthListComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [SmbJoinAuthListComponent], - imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule] + imports: [SharedModule, HttpClientTestingModule, RouterTestingModule] }).compileComponents(); fixture = TestBed.createComponent(SmbJoinAuthListComponent); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.spec.ts index d096f708f628..a1300f298e79 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.spec.ts @@ -5,7 +5,7 @@ import { SharedModule } from '~/app/shared/shared.module'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { ReactiveFormsModule, Validators } from '@angular/forms'; -import { ToastrModule } from 'ngx-toastr'; + import { CheckboxModule, ComboBoxModule, @@ -29,7 +29,6 @@ describe('SmbShareFormComponent', () => { HttpClientTestingModule, RouterTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), GridModule, InputModule, NumberModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-list/smb-share-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-list/smb-share-list.component.spec.ts index 9822fe2ed928..931b62c77ebe 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-list/smb-share-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-list/smb-share-list.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SmbShareListComponent } from './smb-share-list.component'; import { provideHttpClientTesting } from '@angular/common/http/testing'; import { provideHttpClient } from '@angular/common/http'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; describe('SmbShareListComponent', () => { @@ -12,7 +12,7 @@ describe('SmbShareListComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ToastrModule.forRoot(), SharedModule], + imports: [SharedModule], declarations: [SmbShareListComponent], providers: [provideHttpClient(), provideHttpClientTesting()] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-form/smb-usersgroups-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-form/smb-usersgroups-form.component.spec.ts index 8cfc7b39ab30..5dcb4fca144c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-form/smb-usersgroups-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-form/smb-usersgroups-form.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SmbUsersgroupsFormComponent } from './smb-usersgroups-form.component'; -import { ToastrModule } from 'ngx-toastr'; + import { provideHttpClient } from '@angular/common/http'; import { provideHttpClientTesting } from '@angular/common/http/testing'; import { FormGroup, ReactiveFormsModule } from '@angular/forms'; @@ -38,7 +38,7 @@ describe('SmbUsersgroupsFormComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ToastrModule.forRoot(), SharedModule, ReactiveFormsModule], + imports: [SharedModule, ReactiveFormsModule], declarations: [SmbUsersgroupsFormComponent], providers: [provideHttpClient(), provideHttpClientTesting(), provideRouter([])] }).compileComponents(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-list/smb-usersgroups-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-list/smb-usersgroups-list.component.spec.ts index 6d15c8001228..ba4e7504222b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-list/smb-usersgroups-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-usersgroups-list/smb-usersgroups-list.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SmbUsersgroupsListComponent } from './smb-usersgroups-list.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '~/app/shared/shared.module'; describe('SmbUsersgroupsListComponent', () => { @@ -13,7 +13,7 @@ describe('SmbUsersgroupsListComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [SmbUsersgroupsListComponent], - imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule] + imports: [SharedModule, HttpClientTestingModule, RouterTestingModule] }).compileComponents(); fixture = TestBed.createComponent(SmbUsersgroupsListComponent); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login-password-form/login-password-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login-password-form/login-password-form.component.spec.ts index 062d076e424e..3b94e5cd0d78 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login-password-form/login-password-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login-password-form/login-password-form.component.spec.ts @@ -4,8 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { AuthService } from '~/app/shared/api/auth.service'; import { ComponentsModule } from '~/app/shared/components/components.module'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; @@ -30,7 +28,6 @@ describe('LoginPasswordFormComponent', () => { RouterTestingModule, ReactiveFormsModule, ComponentsModule, - ToastrModule.forRoot(), SharedModule ], declarations: [LoginPasswordFormComponent] 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 c1d979dd8378..f10e315e5df2 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 @@ -5,7 +5,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { Router, Routes } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { RoleService } from '~/app/shared/api/role.service'; @@ -37,7 +36,6 @@ describe('RoleFormComponent', () => { RouterTestingModule.withRoutes(routes), HttpClientTestingModule, ReactiveFormsModule, - ToastrModule.forRoot(), SharedModule ], declarations: [RoleFormComponent, FakeComponent] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.spec.ts index b2ece204c7bf..9d9c52ef6100 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.spec.ts @@ -4,7 +4,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { TableActionsComponent } from '~/app/shared/datatable/table-actions/table-actions.component'; import { SharedModule } from '~/app/shared/shared.module'; @@ -22,7 +21,6 @@ describe('RoleListComponent', () => { imports: [ BrowserAnimationsModule, SharedModule, - ToastrModule.forRoot(), NgbNavModule, RouterTestingModule, HttpClientTestingModule 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 c39eeb050afc..130349344866 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 @@ -6,7 +6,7 @@ import { Router, Routes } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { RoleService } from '~/app/shared/api/role.service'; @@ -49,7 +49,6 @@ describe('UserFormComponent', () => { HttpClientTestingModule, ReactiveFormsModule, ComponentsModule, - ToastrModule.forRoot(), SharedModule, NgbPopoverModule ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.spec.ts index beed66c40afd..a8ae79a3f90b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.spec.ts @@ -4,7 +4,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { TableActionsComponent } from '~/app/shared/datatable/table-actions/table-actions.component'; import { SharedModule } from '~/app/shared/shared.module'; @@ -20,7 +19,6 @@ describe('UserListComponent', () => { imports: [ BrowserAnimationsModule, SharedModule, - ToastrModule.forRoot(), NgbNavModule, RouterTestingModule, HttpClientTestingModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.spec.ts index b1df8cf42e4e..d1a71b4ed550 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.spec.ts @@ -4,8 +4,6 @@ import { ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { ComponentsModule } from '~/app/shared/components/components.module'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; @@ -28,7 +26,6 @@ describe('UserPasswordFormComponent', () => { RouterTestingModule, ReactiveFormsModule, ComponentsModule, - ToastrModule.forRoot(), SharedModule ], declarations: [UserPasswordFormComponent] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.spec.ts index 5763d4d975fb..3e9b24ebf8e6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.spec.ts @@ -2,8 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { ErrorComponent } from './error.component'; @@ -14,7 +12,7 @@ describe('ErrorComponent', () => { configureTestBed({ declarations: [ErrorComponent], - imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, ToastrModule.forRoot()] + imports: [HttpClientTestingModule, RouterTestingModule, SharedModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.spec.ts index 22451d8206a0..093212a8e0ff 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.spec.ts @@ -3,8 +3,6 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { RbdService } from '~/app/shared/api/rbd.service'; import { CssHelper } from '~/app/shared/classes/css-helper'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; @@ -17,7 +15,7 @@ describe('WorkbenchLayoutComponent', () => { let fixture: ComponentFixture; configureTestBed({ - imports: [RouterTestingModule, ToastrModule.forRoot(), PipesModule, HttpClientTestingModule], + imports: [RouterTestingModule, PipesModule, HttpClientTestingModule], declarations: [WorkbenchLayoutComponent], schemas: [NO_ERRORS_SCHEMA], providers: [AuthStorageService, CssHelper, RbdService] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.spec.ts index 9ee956f4bdf7..1b5e18bccab1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { SimplebarAngularModule } from 'simplebar-angular'; import { of } from 'rxjs'; @@ -69,7 +68,6 @@ describe('NavigationComponent', () => { imports: [ HttpClientTestingModule, SharedModule, - ToastrModule.forRoot(), RouterTestingModule, SimplebarAngularModule, NgbModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts index 85659e2944b4..6731eed237e7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts @@ -10,7 +10,6 @@ import { NotificationType } from '../../../../shared/enum/notification-type.enum import { SharedModule } from '../../../../shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - describe('NotificationAreaComponent', () => { let component: NotificationAreaComponent; let fixture: ComponentFixture; 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 a5c7ccba21be..fda5fbeaa8a3 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 @@ -2,8 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; - import { CdNotification, CdNotificationConfig } from '~/app/shared/models/cd-notification'; import { ExecutingTask } from '~/app/shared/models/executing-task'; import { NotificationService } from '~/app/shared/services/notification.service'; @@ -30,7 +28,7 @@ describe('NotificationsComponent', () => { }; configureTestBed({ - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], declarations: [NotificationsComponent], providers: [{ provide: NotificationService, useValue: notificationServiceMock }] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-snapshot-schedule.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-snapshot-schedule.service.spec.ts index 766b8f385b24..b1510c5e293f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-snapshot-schedule.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-snapshot-schedule.service.spec.ts @@ -1,6 +1,5 @@ import { TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - import { configureTestBed } from '~/testing/unit-test-helper'; import { CephfsSnapshotScheduleService } from './cephfs-snapshot-schedule.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume-group.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume-group.service.spec.ts index 13dad1430412..7140fd482bbd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume-group.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume-group.service.spec.ts @@ -3,7 +3,6 @@ import { TestBed } from '@angular/core/testing'; import { configureTestBed } from '~/testing/unit-test-helper'; import { CephfsSubvolumeGroupService } from './cephfs-subvolume-group.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - describe('CephfsSubvolumeGroupService', () => { let service: CephfsSubvolumeGroupService; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/directory-store.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/directory-store.service.spec.ts index 78590c89f53f..02c4e42cd89b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/directory-store.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/directory-store.service.spec.ts @@ -4,7 +4,6 @@ import { DirectoryStoreService } from './directory-store.service'; import { configureTestBed } from '~/testing/unit-test-helper'; import { CephfsService } from './cephfs.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - describe('DirectoryStoreService', () => { let service: DirectoryStoreService; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/mgr-module.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/mgr-module.service.spec.ts index 6479b6cd78cb..0f65e6ebc0f1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/mgr-module.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/mgr-module.service.spec.ts @@ -7,7 +7,7 @@ import { MgrModuleService } from './mgr-module.service'; import { CdTableSelection } from '../models/cd-table-selection'; import { NotificationService } from '~/app/shared/services/notification.service'; import { MgrModuleListComponent } from '~/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '../shared.module'; import { BlockUIService } from 'ng-block-ui'; import { SummaryService } from '../services/summary.service'; @@ -19,7 +19,7 @@ describe('MgrModuleService', () => { configureTestBed({ declarations: [MgrModuleListComponent], - imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()], + imports: [HttpClientTestingModule, SharedModule], providers: [MgrModuleService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.spec.ts index 88140fe769ea..3bd9dc4cbcca 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.spec.ts @@ -2,7 +2,6 @@ import { TestBed } from '@angular/core/testing'; import { MultiClusterService } from './multi-cluster.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - describe('MultiClusterService', () => { let service: MultiClusterService; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-multisite.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-multisite.service.spec.ts index 27b1e5fe5457..9ac3d71703da 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-multisite.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-multisite.service.spec.ts @@ -3,7 +3,7 @@ import { TestBed } from '@angular/core/testing'; import { configureTestBed } from '~/testing/unit-test-helper'; import { RgwMultisiteService } from './rgw-multisite.service'; import { BlockUIModule } from 'ng-block-ui'; -import { ToastrModule } from 'ngx-toastr'; + import { SharedModule } from '../shared.module'; const mockSyncPolicyData: any = [ @@ -28,12 +28,7 @@ describe('RgwMultisiteService', () => { configureTestBed({ providers: [RgwMultisiteService], - imports: [ - HttpClientTestingModule, - BlockUIModule.forRoot(), - ToastrModule.forRoot(), - SharedModule - ] + imports: [HttpClientTestingModule, BlockUIModule.forRoot(), SharedModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/smb.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/smb.service.spec.ts index 53b020ad5b02..161e81ce79cb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/smb.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/smb.service.spec.ts @@ -10,7 +10,7 @@ import { USERSGROUPS_RESOURCE } from '~/app/ceph/smb/smb.model'; import { NotificationService } from '../services/notification.service'; -import { ToastrModule } from 'ngx-toastr'; + import { NotificationType } from '../enum/notification-type.enum'; import { SharedModule } from '../shared.module'; import { USER } from '~/app/shared/constants/app.constants'; @@ -22,7 +22,7 @@ describe('SmbService', () => { configureTestBed({ providers: [SmbService, provideHttpClient(), provideHttpClientTesting()], - imports: [ToastrModule.forRoot(), SharedModule] + imports: [SharedModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.spec.ts index 1acdd85ccb17..5cac6c1cf579 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; -import { FormControl, FormsModule } from '@angular/forms'; +import { FormControl } from '@angular/forms'; import { configureTestBed } from '~/testing/unit-test-helper'; import { DateTimePickerComponent } from './date-time-picker.component'; @@ -15,7 +15,7 @@ describe('DateTimePickerComponent', () => { configureTestBed({ declarations: [DateTimePickerComponent], - imports: [DatePickerModule, FormsModule, TimePickerModule, TimePickerSelectModule] + imports: [DatePickerModule, TimePickerModule, TimePickerSelectModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts deleted file mode 100644 index a34934ab6cd9..000000000000 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { - ComponentFixture, - discardPeriodicTasks, - fakeAsync, - TestBed, - tick -} from '@angular/core/testing'; -import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { RouterTestingModule } from '@angular/router/testing'; - -import { NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap'; -import { ClickOutsideModule } from 'ng-click-outside'; -import { ToastrModule } from 'ngx-toastr'; -import { SimplebarAngularModule } from 'simplebar-angular'; - -import { PrometheusService } from '~/app/shared/api/prometheus.service'; -import { NotificationType } from '~/app/shared/enum/notification-type.enum'; -import { ExecutingTask } from '~/app/shared/models/executing-task'; -import { Permissions } from '~/app/shared/models/permissions'; -import { PipesModule } from '~/app/shared/pipes/pipes.module'; -import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; -import { NotificationService } from '~/app/shared/services/notification.service'; -import { PrometheusAlertService } from '~/app/shared/services/prometheus-alert.service'; -import { PrometheusNotificationService } from '~/app/shared/services/prometheus-notification.service'; -import { SummaryService } from '~/app/shared/services/summary.service'; -import { configureTestBed } from '~/testing/unit-test-helper'; -import { NotificationsSidebarComponent } from './notifications-sidebar.component'; - -describe('NotificationsSidebarComponent', () => { - let component: NotificationsSidebarComponent; - let fixture: ComponentFixture; - let prometheusUpdatePermission: string; - let prometheusReadPermission: string; - let prometheusCreatePermission: string; - let configOptReadPermission: string; - - configureTestBed({ - imports: [ - HttpClientTestingModule, - PipesModule, - NgbProgressbarModule, - RouterTestingModule, - ToastrModule.forRoot(), - NoopAnimationsModule, - SimplebarAngularModule, - ClickOutsideModule - ], - declarations: [NotificationsSidebarComponent], - providers: [ - { - provide: PrometheusService, - useValue: { - setSilence: jasmine.createSpy('setSilence'), - expireSilence: jasmine.createSpy('expireSilence') - } - }, - { - provide: PrometheusAlertService, - useValue: { - refresh: jasmine.createSpy('refresh') - } - }, - { - provide: PrometheusNotificationService, - useValue: { - refresh: jasmine.createSpy('refresh') - } - } - ] - }); - - beforeEach(() => { - prometheusReadPermission = 'read'; - prometheusUpdatePermission = 'update'; - prometheusCreatePermission = 'create'; - configOptReadPermission = 'read'; - spyOn(TestBed.inject(AuthStorageService), 'getPermissions').and.callFake( - () => - new Permissions({ - prometheus: [ - prometheusReadPermission, - prometheusUpdatePermission, - prometheusCreatePermission - ], - 'config-opt': [configOptReadPermission] - }) - ); - fixture = TestBed.createComponent(NotificationsSidebarComponent); - component = fixture.componentInstance; - }); - - it('should create', () => { - fixture.detectChanges(); - expect(component).toBeTruthy(); - }); - - describe('prometheus alert handling', () => { - let prometheusAlertService: PrometheusAlertService; - let prometheusNotificationService: PrometheusNotificationService; - - const expectPrometheusServicesToBeCalledTimes = (n: number) => { - expect(prometheusNotificationService.refresh).toHaveBeenCalledTimes(n); - expect(prometheusAlertService.refresh).toHaveBeenCalledTimes(n); - }; - - beforeEach(() => { - prometheusAlertService = TestBed.inject(PrometheusAlertService); - prometheusNotificationService = TestBed.inject(PrometheusNotificationService); - - (prometheusAlertService.refresh as jasmine.Spy).calls.reset(); - (prometheusNotificationService.refresh as jasmine.Spy).calls.reset(); - }); - - it('should not refresh prometheus services if not allowed', () => { - prometheusReadPermission = ''; - configOptReadPermission = 'read'; - fixture.detectChanges(); - - expectPrometheusServicesToBeCalledTimes(0); - - prometheusReadPermission = 'read'; - configOptReadPermission = ''; - fixture.detectChanges(); - - expectPrometheusServicesToBeCalledTimes(0); - }); - - it('should first refresh prometheus notifications and alerts during init', () => { - fixture.detectChanges(); - - expect(prometheusAlertService.refresh).toHaveBeenCalledTimes(1); - expectPrometheusServicesToBeCalledTimes(1); - }); - - it('should refresh prometheus services every 5s', fakeAsync(() => { - fixture.detectChanges(); - - expectPrometheusServicesToBeCalledTimes(1); - tick(5000); - expectPrometheusServicesToBeCalledTimes(2); - tick(15000); - expectPrometheusServicesToBeCalledTimes(5); - component.ngOnDestroy(); - })); - }); - - describe('Running Tasks', () => { - let summaryService: SummaryService; - - beforeEach(() => { - fixture.detectChanges(); - summaryService = TestBed.inject(SummaryService); - - spyOn(component, '_handleTasks').and.callThrough(); - }); - - it('should handle executing tasks', () => { - const running_tasks = new ExecutingTask('rbd/delete', { - image_spec: 'somePool/someImage' - }); - - summaryService['summaryDataSource'].next({ executing_tasks: [running_tasks] }); - - expect(component._handleTasks).toHaveBeenCalled(); - expect(component.executingTasks.length).toBe(1); - expect(component.executingTasks[0].description).toBe(`Deleting RBD 'somePool/someImage'`); - }); - }); - - describe('Notifications', () => { - it('should fetch latest notifications', fakeAsync(() => { - const notificationService: NotificationService = TestBed.inject(NotificationService); - fixture.detectChanges(); - - expect(component.notifications.length).toBe(0); - - notificationService.show(NotificationType.success, 'Sample title', 'Sample message'); - tick(6000); - expect(component.notifications.length).toBe(1); - expect(component.notifications[0].title).toBe('Sample title'); - discardPeriodicTasks(); - })); - }); -}); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.spec.ts index dd5012bd5377..6dde754f437d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.spec.ts @@ -2,7 +2,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; + import { of } from 'rxjs'; import { MgrModuleService } from '~/app/shared/api/mgr-module.service'; @@ -42,13 +42,7 @@ describe('TelemetryActivationNotificationComponent', () => { configureTestBed({ declarations: [TelemetryNotificationComponent, AlertPanelComponent], - imports: [ - NgbAlertModule, - HttpClientTestingModule, - ToastrModule.forRoot(), - PipesModule, - BlockUIModule.forRoot() - ], + imports: [NgbAlertModule, HttpClientTestingModule, PipesModule, BlockUIModule.forRoot()], providers: [MgrModuleService, UserService] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.spec.ts index 0c82410e2478..7c7e57074b6d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.spec.ts @@ -5,7 +5,6 @@ import { FormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { ComponentsModule } from '~/app/shared/components/components.module'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; @@ -33,8 +32,7 @@ describe('CRUDTableComponent', () => { PipesModule, NgbTooltipModule, RouterTestingModule, - HttpClientTestingModule, - ToastrModule.forRoot() + HttpClientTestingModule ] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.spec.ts index fb0293443a9f..9a119e96315e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.spec.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { configureTestBed } from '~/testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/crud-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/crud-form.component.spec.ts index 50c6bb1998f8..8a324a3a1c7f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/crud-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/crud-form.component.spec.ts @@ -1,7 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ToastrModule, ToastrService } from 'ngx-toastr'; import { configureTestBed } from '~/testing/unit-test-helper'; import { CdDatePipe } from '~/app/shared/pipes/cd-date.pipe'; import { CrudFormComponent } from './crud-form.component'; @@ -10,18 +9,10 @@ import { RouterTestingModule } from '@angular/router/testing'; describe('CrudFormComponent', () => { let component: CrudFormComponent; let fixture: ComponentFixture; - const toastFakeService = { - error: () => true, - info: () => true, - success: () => true - }; configureTestBed({ - imports: [ToastrModule.forRoot(), RouterTestingModule, HttpClientTestingModule], - providers: [ - { provide: ToastrService, useValue: toastFakeService }, - { provide: CdDatePipe, useValue: { transform: (d: any) => d } } - ] + imports: [RouterTestingModule, HttpClientTestingModule], + providers: [{ provide: CdDatePipe, useValue: { transform: (d: any) => d } }] }); configureTestBed({ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.spec.ts index 8c62230f12f9..d7ddc1b29f2f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.spec.ts @@ -3,8 +3,6 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/ import { fakeAsync, TestBed, tick, flush } from '@angular/core/testing'; import { Router } from '@angular/router'; -import { ToastrService } from 'ngx-toastr'; - import { AppModule } from '~/app/app.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { NotificationType } from '../enum/notification-type.enum'; @@ -70,7 +68,6 @@ describe('ApiInterceptorService', () => { providers: [ NotificationService, { - provide: ToastrService, useValue: { error: () => true } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.spec.ts index ca1627dbece8..1a91cde97bfe 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.spec.ts @@ -9,7 +9,7 @@ import { of as observableOf, throwError } from 'rxjs'; import { configureTestBed } from '~/testing/unit-test-helper'; import { MgrModuleService } from '../api/mgr-module.service'; import { ModuleStatusGuardService } from './module-status-guard.service'; -import { ToastrModule } from 'ngx-toastr'; + import { CdDatePipe } from '../pipes/cd-date.pipe'; import { SharedModule } from '../shared.module'; @@ -56,7 +56,7 @@ describe('ModuleStatusGuardService', () => { }; configureTestBed({ - imports: [RouterTestingModule.withRoutes(routes), ToastrModule.forRoot(), SharedModule], + imports: [RouterTestingModule.withRoutes(routes), SharedModule], providers: [ ModuleStatusGuardService, { provide: HttpClient, useValue: fakeService }, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts index b6da64593c80..584e711acec9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts @@ -1,6 +1,5 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; import { configureTestBed, PrometheusHelper } from '~/testing/unit-test-helper'; import { NotificationType } from '../enum/notification-type.enum'; @@ -16,7 +15,7 @@ describe('PrometheusAlertFormatter', () => { let prometheus: PrometheusHelper; configureTestBed({ - imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule], + imports: [SharedModule, HttpClientTestingModule], providers: [PrometheusAlertFormatter] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.spec.ts index b2ef14a1ada5..ea0fb60f1d33 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.spec.ts @@ -1,7 +1,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; -import { ToastrModule } from 'ngx-toastr'; import { Observable, of } from 'rxjs'; import { configureTestBed, PrometheusHelper } from '~/testing/unit-test-helper'; @@ -22,7 +21,7 @@ describe('PrometheusAlertService', () => { let prometheus: PrometheusHelper; configureTestBed({ - imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule], + imports: [SharedModule, HttpClientTestingModule], providers: [PrometheusAlertService, PrometheusAlertFormatter] }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts index c3fd51323e74..bf16fd9d019e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts @@ -1,7 +1,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { fakeAsync, TestBed, tick, flush } from '@angular/core/testing'; -import { ToastrModule, ToastrService } from 'ngx-toastr'; import { of, throwError } from 'rxjs'; import { configureTestBed, PrometheusHelper } from '~/testing/unit-test-helper'; @@ -23,19 +22,9 @@ describe('PrometheusNotificationService', () => { let shown: CdNotificationConfig[]; let getNotificationSinceMock: Function; - const toastFakeService = { - error: () => true, - info: () => true, - success: () => true - }; - configureTestBed({ - imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule], - providers: [ - PrometheusNotificationService, - PrometheusAlertFormatter, - { provide: ToastrService, useValue: toastFakeService } - ] + imports: [SharedModule, HttpClientTestingModule], + providers: [PrometheusNotificationService, PrometheusAlertFormatter] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-wrapper.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-wrapper.service.spec.ts index e819622118ec..10dea07b4489 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-wrapper.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-wrapper.service.spec.ts @@ -2,7 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; import { Observable } from 'rxjs'; import { configureTestBed } from '~/testing/unit-test-helper'; @@ -17,7 +16,7 @@ describe('TaskWrapperService', () => { let service: TaskWrapperService; configureTestBed({ - imports: [HttpClientTestingModule, ToastrModule.forRoot(), SharedModule, RouterTestingModule], + imports: [HttpClientTestingModule, SharedModule, RouterTestingModule], providers: [TaskWrapperService] });