],
"styles": [
"node_modules/swagger-ui-dist/swagger-ui.css",
- "node_modules/ngx-toastr/toastr.css",
"src/styles.scss"
],
"stylePreprocessorOptions": {
"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",
"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",
"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",
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';
configureTestBed({
declarations: [IscsiTargetDiscoveryModalComponent],
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- SharedModule,
- ToastrModule.forRoot(),
- RouterTestingModule
- ],
+ imports: [HttpClientTestingModule, ReactiveFormsModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal]
});
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';
configureTestBed({
declarations: [IscsiTargetFormComponent],
- imports: [
- SharedModule,
- ReactiveFormsModule,
- HttpClientTestingModule,
- RouterTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule],
providers: [
{
provide: ActivatedRoute,
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';
HttpClientTestingModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
NgbNavModule
],
declarations: [IscsiTargetListComponent, IscsiTabsComponent, IscsiTargetDetailsComponent],
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
ModalModule,
InputModule,
SelectModule,
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
ModalModule,
SelectModule,
InputModule,
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';
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
ButtonModule,
InputModule,
GridModule
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
ModalModule,
SelectModule
],
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
ModalModule,
InputModule
],
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';
configureTestBed({
declarations: [PoolListComponent, MirrorHealthColorPipe],
- imports: [
- BrowserAnimationsModule,
- SharedModule,
- HttpClientTestingModule,
- RouterTestingModule,
- ToastrModule.forRoot()
- ]
+ imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, RouterTestingModule]
});
beforeEach(() => {
import { NvmeSubsystemViewComponent } from './nvme-subsystem-view.component';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-
describe('NvmeSubsystemViewComponent', () => {
let component: NvmeSubsystemViewComponent;
let fixture: ComponentFixture<NvmeSubsystemViewComponent>;
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';
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 },
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';
CheckboxModule,
GridModule,
InputModule,
- SelectModule,
- ToastrModule.forRoot()
+ SelectModule
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
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';
NgbTypeaheadModule,
ReactiveFormsModule,
RouterTestingModule,
- SharedModule,
- ToastrModule.forRoot()
+ SharedModule
]
}).compileComponents();
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';
}
}
],
- imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, ToastrModule.forRoot()],
+ imports: [HttpClientTestingModule, RouterTestingModule, SharedModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
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';
SharedModule,
ReactiveFormsModule,
RouterTestingModule,
- ToastrModule.forRoot(),
ModalModule,
NumberModule
],
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';
NumberModule,
RadioModule,
ComboBoxModule,
- SelectModule,
- ToastrModule.forRoot()
+ SelectModule
]
}).compileComponents();
fixture = TestBed.createComponent(NvmeofNamespacesFormComponent);
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';
NgbTypeaheadModule,
InputModule,
GridModule,
- ComboBoxModule,
- ToastrModule.forRoot()
+ ComboBoxModule
],
providers: [NgbActiveModal]
}).compileComponents();
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';
InputModule,
GridModule,
RadioModule,
- TagModule,
- ToastrModule.forRoot()
+ TagModule
]
}).compileComponents();
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';
GridModule,
RadioModule,
TagModule,
- InputModule,
- ToastrModule.forRoot()
+ InputModule
]
}).compileComponents();
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- GridModule,
- ToastrModule.forRoot()
+ GridModule
]
}).compileComponents();
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';
GridModule,
RadioModule,
TagModule,
- ToastrModule.forRoot(),
ComboBoxModule
]
}).compileComponents();
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';
HttpClientTestingModule,
ReactiveFormsModule,
RouterTestingModule,
- ToastrModule.forRoot(),
SharedModule,
CheckboxModule,
InputModule,
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';
SharedModule,
NgbNavModule,
NgbTooltipModule,
- ToastrModule.forRoot(),
RouterTestingModule,
HttpClientTestingModule
],
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';
let fixture: ComponentFixture<RbdNamespaceFormModalComponent>;
configureTestBed({
- imports: [
- ReactiveFormsModule,
- ComponentsModule,
- HttpClientTestingModule,
- ToastrModule.forRoot(),
- RouterTestingModule
- ],
+ imports: [ReactiveFormsModule, ComponentsModule, HttpClientTestingModule, RouterTestingModule],
declarations: [RbdNamespaceFormModalComponent],
providers: [NgbActiveModal, AuthStorageService]
});
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';
SharedModule,
HttpClientTestingModule,
RouterTestingModule,
- ToastrModule.forRoot(),
NgbNavModule
],
providers: [TaskListService]
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';
ComponentsModule,
PipesModule,
HttpClientTestingModule,
- ToastrModule.forRoot(),
RouterTestingModule,
ModalModule,
InputModule,
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';
PipesModule,
RouterTestingModule,
NgbNavModule,
- ToastrModule.forRoot(),
ModalModule,
PlaceholderModule,
CoreModule
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';
RouterTestingModule,
SharedModule,
NgbNavModule,
- PipesModule,
- ToastrModule.forRoot()
+ PipesModule
],
providers: [TaskListService]
});
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';
HttpClientTestingModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
NgbPopoverModule,
ModalModule,
CheckboxModule,
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';
HttpClientTestingModule,
ReactiveFormsModule,
SharedModule,
- ToastrModule.forRoot(),
RouterTestingModule,
ModalModule,
SelectModule
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';
imports: [
ReactiveFormsModule,
HttpClientTestingModule,
- ToastrModule.forRoot(),
SharedModule,
RouterTestingModule,
InputModule,
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';
HttpClientTestingModule,
SharedModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
RouterTestingModule,
NgbTypeaheadModule,
ModalModule,
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';
let fixture: ComponentFixture<CephfsClientsComponent>;
configureTestBed({
- imports: [
- BrowserAnimationsModule,
- ToastrModule.forRoot(),
- SharedModule,
- HttpClientTestingModule
- ],
+ imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule],
declarations: [CephfsClientsComponent]
});
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';
SharedModule,
RouterTestingModule,
TreeviewModule,
- ToastrModule.forRoot(),
NgbModalModule
],
declarations: [CephfsDirectoriesComponent],
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';
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
GridModule,
InputModule,
SelectModule,
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';
let cephfsService: CephfsService;
configureTestBed({
- imports: [
- BrowserAnimationsModule,
- SharedModule,
- HttpClientTestingModule,
- ToastrModule.forRoot(),
- RouterTestingModule
- ],
+ imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, RouterTestingModule],
declarations: [CephfsListComponent, CephfsTabsStubComponent, CephfsVolumeFormComponent]
});
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';
configureTestBed({
declarations: [CephfsMountDetailsComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal]
});
} 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';
providers: [ModalService, { provide: 'fsName', useValue: 'test_fs' }],
imports: [
SharedModule,
- ToastrModule.forRoot(),
ReactiveFormsModule,
HttpClientTestingModule,
RouterTestingModule,
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';
configureTestBed({
declarations: [CephfsSnapshotscheduleListComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal]
});
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';
providers: [NgbActiveModal],
imports: [
SharedModule,
- ToastrModule.forRoot(),
ReactiveFormsModule,
HttpClientTestingModule,
RouterTestingModule,
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';
configureTestBed({
declarations: [CephfsSubvolumeGroupComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule]
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule]
});
beforeEach(() => {
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';
configureTestBed({
declarations: [CephfsSubvolumeListComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal]
});
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';
declarations: [CephfsSubvolumeSnapshotsFormComponent],
imports: [
SharedModule,
- ToastrModule.forRoot(),
ReactiveFormsModule,
HttpClientTestingModule,
RouterTestingModule,
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;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [CephfsSubvolumeSnapshotsListComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()]
+ imports: [HttpClientTestingModule, SharedModule]
}).compileComponents();
fixture = TestBed.createComponent(CephfsSubvolumeSnapshotsListComponent);
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';
providers: [NgbActiveModal],
imports: [
SharedModule,
- ToastrModule.forRoot(),
ReactiveFormsModule,
HttpClientTestingModule,
RouterTestingModule,
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';
}
configureTestBed({
- imports: [SharedModule, NgbNavModule, HttpClientTestingModule, ToastrModule.forRoot()],
+ imports: [SharedModule, NgbNavModule, HttpClientTestingModule],
declarations: [
CephfsTabsComponent,
CephfsChartStubComponent,
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';
let fixture: ComponentFixture<ConfigurationFormComponent>;
configureTestBed({
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- RouterTestingModule,
- ToastrModule.forRoot(),
- SharedModule
- ],
+ imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule],
declarations: [ConfigurationFormComponent]
});
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';
let fixture: ComponentFixture<CreateClusterReviewComponent>;
configureTestBed({
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), CephModule, CoreModule]
+ imports: [HttpClientTestingModule, SharedModule, CephModule, CoreModule]
});
beforeEach(() => {
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';
const projectConstants: typeof AppConstants = AppConstants;
configureTestBed({
- imports: [
- HttpClientTestingModule,
- RouterTestingModule,
- ToastrModule.forRoot(),
- SharedModule,
- CoreModule,
- CephModule
- ]
+ imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, CoreModule, CephModule]
});
beforeEach(() => {
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';
CephModule,
CoreModule,
CephSharedModule,
- SharedModule,
- ToastrModule.forRoot()
+ SharedModule
]
});
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';
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
InputModule,
ModalModule
],
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';
SharedModule,
HttpClientTestingModule,
RouterTestingModule,
- ToastrModule.forRoot(),
CephModule,
CoreModule,
TagModule
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';
FormsModule,
HttpClientTestingModule,
SharedModule,
- RouterTestingModule,
- ToastrModule.forRoot()
+ RouterTestingModule
],
providers: [
{ provide: AuthStorageService, useValue: fakeAuthStorageService },
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';
FormsModule,
SharedModule,
HttpClientTestingModule,
- RouterTestingModule,
- ToastrModule.forRoot()
+ RouterTestingModule
],
declarations: [InventoryComponent, InventoryDevicesComponent]
});
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';
SharedModule,
FormsModule,
NgbDatepickerModule,
- NgbTimepickerModule,
- ToastrModule.forRoot()
+ NgbTimepickerModule
],
declarations: [LogsComponent]
});
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;
configureTestBed({
declarations: [MgrModuleDetailsComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()]
+ imports: [HttpClientTestingModule, SharedModule]
});
beforeEach(() => {
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';
configureTestBed({
declarations: [MgrModuleFormComponent],
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- RouterTestingModule,
- SharedModule,
- ToastrModule.forRoot()
- ]
+ imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule]
});
beforeEach(() => {
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';
RouterTestingModule,
SharedModule,
HttpClientTestingModule,
- NgbNavModule,
- ToastrModule.forRoot()
+ NgbNavModule
],
providers: [MgrModuleService]
});
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';
InputModule,
SelectModule,
RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
+ HttpClientTestingModule
],
declarations: [MultiClusterFormComponent],
providers: [NgbActiveModal, NotificationService, CdDatePipe, DatePipe]
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';
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [HttpClientTestingModule, ToastrModule.forRoot(), NgbNavModule, SharedModule],
+ imports: [HttpClientTestingModule, NgbNavModule, SharedModule],
declarations: [MultiClusterListComponent],
providers: [CdDatePipe, TableActionsComponent, { provide: ActivatedRoute, useValue: {} }]
}).compileComponents();
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;
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()],
+ imports: [HttpClientTestingModule, SharedModule],
declarations: [MultiClusterComponent],
providers: [NgbActiveModal, DimlessBinaryPipe]
}).compileComponents();
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';
let fixture: ComponentFixture<OsdCreationPreviewModalComponent>;
configureTestBed({
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- SharedModule,
- RouterTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [HttpClientTestingModule, ReactiveFormsModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal],
declarations: [OsdCreationPreviewModalComponent]
});
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';
FormsModule,
HttpClientTestingModule,
SharedModule,
- ToastrModule.forRoot(),
RouterTestingModule
],
declarations: [OsdDevicesSelectionGroupsComponent, InventoryDevicesComponent]
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';
HttpClientTestingModule,
SharedModule,
ReactiveFormsModule,
- RouterTestingModule,
- ToastrModule.forRoot()
+ RouterTestingModule
],
providers: [NgbActiveModal],
declarations: [OsdDevicesSelectionModalComponent, InventoryDevicesComponent]
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';
HttpClientTestingModule,
ReactiveFormsModule,
SharedModule,
- ToastrModule.forRoot(),
TooltipModule,
RouterTestingModule
],
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';
let httpTesting: HttpTestingController;
configureTestBed({
- imports: [
- ReactiveFormsModule,
- SharedModule,
- HttpClientTestingModule,
- RouterTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [ReactiveFormsModule, SharedModule, HttpClientTestingModule, RouterTestingModule],
declarations: [OsdFlagsModalComponent],
providers: [ModalService]
});
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';
FormsModule,
SharedModule,
RouterTestingModule,
- ReactiveFormsModule,
- ToastrModule.forRoot()
+ ReactiveFormsModule
],
declarations: [OsdFormComponent, OsdDevicesSelectionGroupsComponent, InventoryDevicesComponent]
});
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';
BrowserAnimationsModule,
HttpClientTestingModule,
PerformanceCounterModule,
- ToastrModule.forRoot(),
CephModule,
ReactiveFormsModule,
NgbDropdownModule,
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';
let configurationService: ConfigurationService;
configureTestBed({
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- RouterTestingModule,
- SharedModule,
- ToastrModule.forRoot()
- ],
+ imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule],
declarations: [OsdPgScrubModalComponent],
providers: [NgbActiveModal]
});
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';
let configurationService: ConfigurationService;
configureTestBed({
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- RouterTestingModule,
- SharedModule,
- ToastrModule.forRoot()
- ],
+ imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule],
declarations: [OsdRecvSpeedModalComponent],
providers: [NgbActiveModal]
});
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';
HttpClientTestingModule,
NgbNavModule,
RouterTestingModule,
- ToastrModule.forRoot(),
SharedModule,
ClusterModule,
CephModule,
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';
configureTestBed({
declarations: [RulesListComponent, PrometheusTabsComponent],
- imports: [
- HttpClientTestingModule,
- SharedModule,
- NgbNavModule,
- RouterTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [HttpClientTestingModule, SharedModule, NgbNavModule, RouterTestingModule],
providers: [PrometheusService, SettingsService]
});
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';
HttpClientTestingModule,
RouterTestingModule.withRoutes(routes),
SharedModule,
- ToastrModule.forRoot(),
NgbTooltipModule,
NgbPopoverModule,
ReactiveFormsModule
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';
imports: [
BrowserAnimationsModule,
SharedModule,
- ToastrModule.forRoot(),
RouterTestingModule,
HttpClientTestingModule,
NgbNavModule
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';
};
configureTestBed({
- imports: [
- HttpClientTestingModule,
- CephModule,
- CoreModule,
- PipesModule,
- SharedModule,
- ToastrModule.forRoot()
- ]
+ imports: [HttpClientTestingModule, CephModule, CoreModule, PipesModule, SharedModule]
});
beforeEach(() => {
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';
RouterTestingModule,
SharedModule,
NgbNavModule,
- PipesModule,
- ToastrModule.forRoot()
+ PipesModule
],
declarations: [ServiceDetailsComponent, ServiceDaemonListComponent],
providers: [{ provide: SummaryService, useValue: { subscribeOnce: jest.fn() } }]
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
InputModule,
SelectModule,
NumberModule,
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';
CoreModule,
SharedModule,
HttpClientTestingModule,
- RouterTestingModule,
- ToastrModule.forRoot()
+ RouterTestingModule
],
providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }]
});
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';
configureTestBed({
declarations: [TelemetryComponent],
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- RouterTestingModule,
- SharedModule,
- ToastrModule.forRoot()
- ]
+ imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule]
});
describe('configForm', () => {
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', () => {
let fixture: ComponentFixture<UpgradeComponent>;
configureTestBed({
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
schemas: [NO_ERRORS_SCHEMA],
declarations: [UpgradeComponent],
providers: [UpgradeService]
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';
configureTestBed({
declarations: [UpgradeProgressComponent, LogsComponent],
- imports: [ToastrModule.forRoot(), HttpClientTestingModule, SharedModule, RouterTestingModule]
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule]
});
beforeEach(() => {
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';
};
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 }]
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<NfsClusterDetailsComponent>;
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
NgbTypeaheadModule
],
providers: [
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';
HttpClientTestingModule,
RouterTestingModule,
SharedModule,
- NgbNavModule,
- ToastrModule.forRoot()
+ NgbNavModule
],
providers: [TaskListService]
});
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';
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';
};
configureTestBed({
- imports: [HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot(), PoolModule],
+ imports: [HttpClientTestingModule, RouterTestingModule, PoolModule],
providers: [CrushRuleService, NgbActiveModal]
});
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';
};
configureTestBed({
- imports: [HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot(), PoolModule],
+ imports: [HttpClientTestingModule, RouterTestingModule, PoolModule],
providers: [ErasureCodeProfileService, NgbActiveModal]
});
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';
BrowserAnimationsModule,
HttpClientTestingModule,
RouterTestingModule.withRoutes(routes),
- ToastrModule.forRoot(),
NgbNavModule,
PoolModule,
SharedModule,
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';
imports: [
BrowserAnimationsModule,
SharedModule,
- ToastrModule.forRoot(),
RouterTestingModule,
NgbNavModule,
HttpClientTestingModule
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';
let fixture: ComponentFixture<CreateRgwServiceEntitiesComponent>;
configureTestBed({
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
providers: [NgbActiveModal],
declarations: [CreateRgwServiceEntitiesComponent]
});
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';
configureTestBed({
declarations: [RgwMultisiteZoneDeletionFormComponent],
- imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [SharedModule, HttpClientTestingModule, RouterTestingModule],
providers: []
});
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';
configureTestBed({
declarations: [RgwMultisiteZonegroupDeletionFormComponent],
- imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [SharedModule, HttpClientTestingModule, RouterTestingModule],
providers: [NgbActiveModal]
});
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
SelectModule,
CheckboxModule
],
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,
SelectModule,
NumberModule,
InputModule,
- ToastrModule.forRoot(),
ComponentsModule,
ModalModule
],
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;
RouterTestingModule,
SharedModule,
NgbNavModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
+ HttpClientTestingModule
]
});
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: [] }]));
configureTestBed({
declarations: [RgwBucketNotificationListComponent],
- imports: [ComponentsModule, HttpClientTestingModule, ToastrModule.forRoot()],
+ imports: [ComponentsModule, HttpClientTestingModule],
providers: [
{ provide: 'bucket', useValue: { bucket: 'bucket1', owner: 'dashboard' } },
{ provide: RgwBucketService, useClass: MockRgwBucketService }
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,
SelectModule,
NumberModule,
InputModule,
- ToastrModule.forRoot(),
ComponentsModule,
ModalModule,
RouterTestingModule
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';
configureTestBed({
declarations: [RgwConfigModalComponent],
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
providers: [NgbActiveModal]
});
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';
configureTestBed({
declarations: [RgwMultisiteDetailsComponent],
- imports: [
- HttpClientTestingModule,
- SharedModule,
- ToastrModule.forRoot(),
- RouterTestingModule,
- NgbNavModule
- ],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule, NgbNavModule],
providers: [NgbActiveModal]
});
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';
let fixture: ComponentFixture<RgwMultisiteExportComponent>;
configureTestBed({
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
declarations: [RgwMultisiteExportComponent],
providers: [NgbActiveModal]
});
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';
let fixture: ComponentFixture<RgwMultisiteImportComponent>;
configureTestBed({
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
declarations: [RgwMultisiteImportComponent],
providers: [NgbActiveModal]
});
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';
let fixture: ComponentFixture<RgwMultisiteMigrateComponent>;
configureTestBed({
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
declarations: [RgwMultisiteMigrateComponent],
providers: [NgbActiveModal]
});
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';
ReactiveFormsModule,
RouterTestingModule,
HttpClientTestingModule,
- ToastrModule.forRoot(),
ModalModule,
InputModule,
CheckboxModule
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';
declarations: [RgwMultisiteSyncFlowModalComponent],
imports: [
HttpClientTestingModule,
- ToastrModule.forRoot(),
PipesModule,
ReactiveFormsModule,
CommonModule,
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';
declarations: [RgwMultisiteSyncPipeModalComponent],
imports: [
HttpClientTestingModule,
- ToastrModule.forRoot(),
PipesModule,
ReactiveFormsModule,
CommonModule,
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';
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [RgwMultisiteSyncPolicyDetailsComponent],
- imports: [
- HttpClientTestingModule,
- ToastrModule.forRoot(),
- PipesModule,
- ModalModule,
- SharedModule
- ]
+ imports: [HttpClientTestingModule, PipesModule, ModalModule, SharedModule]
}).compileComponents();
fixture = TestBed.createComponent(RgwMultisiteSyncPolicyDetailsComponent);
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';
imports: [
HttpClientTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
PipesModule,
ComponentsModule,
SharedModule,
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';
RgwMultisiteTabsComponent,
RgwMultisiteSyncPolicyDetailsComponent
],
- imports: [
- HttpClientModule,
- ToastrModule.forRoot(),
- PipesModule,
- ModalModule,
- SharedModule,
- RouterTestingModule
- ],
+ imports: [HttpClientModule, PipesModule, ModalModule, SharedModule, RouterTestingModule],
providers: [TitleCasePipe]
}).compileComponents();
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';
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();
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';
HttpClientTestingModule,
ModalModule,
InputModule,
- ToastrModule.forRoot(),
CheckboxModule,
SelectModule
],
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';
let rgwZonegroupService: RgwZonegroupService;
configureTestBed({
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
providers: [NgbActiveModal],
declarations: [RgwMultisiteZonegroupFormComponent]
});
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,
SelectModule,
NumberModule,
InputModule,
- ToastrModule.forRoot(),
ComponentsModule,
ModalModule,
ComboBoxModule,
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';
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;
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';
configureTestBed({
imports: [
ReactiveFormsModule,
- ToastrModule.forRoot(),
InputModule,
CheckboxModule,
HttpClientTestingModule,
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
InputModule
],
declarations: [RgwRateLimitComponent],
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,
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
GridModule,
InputModule,
CoreModule,
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', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal],
declarations: [RgwStorageClassListComponent]
}).compileComponents();
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';
let fixture: ComponentFixture<RgwSystemUserComponent>;
configureTestBed({
- imports: [
- SharedModule,
- ReactiveFormsModule,
- RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
- ],
+ imports: [SharedModule, ReactiveFormsModule, RouterTestingModule, HttpClientTestingModule],
declarations: [RgwSystemUserComponent],
providers: [NgbActiveModal]
});
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';
RouterTestingModule,
HttpClientTestingModule,
SharedModule,
- ToastrModule.forRoot(),
SelectModule,
GridModule,
InputModule
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';
BrowserAnimationsModule,
SharedModule,
HttpClientTestingModule,
- ToastrModule.forRoot(),
RouterTestingModule
],
declarations: [RgwTopicListComponent]
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';
declarations: [RgwUserAccountsFormComponent],
imports: [
ComponentsModule,
- ToastrModule.forRoot(),
HttpClientTestingModule,
PipesModule,
RouterTestingModule.withRoutes([
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';
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [RgwUserAccountsComponent],
- imports: [
- ComponentsModule,
- ToastrModule.forRoot(),
- HttpClientTestingModule,
- PipesModule,
- RouterTestingModule
- ]
+ imports: [ComponentsModule, HttpClientTestingModule, PipesModule, RouterTestingModule]
}).compileComponents();
fixture = TestBed.createComponent(RgwUserAccountsComponent);
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';
ReactiveFormsModule,
RouterTestingModule,
SharedModule,
- ToastrModule.forRoot(),
NgbTooltipModule,
PipesModule,
CheckboxModule,
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';
configureTestBed({
declarations: [RgwUserSwiftKeyModalComponent],
- imports: [ToastrModule.forRoot(), FormsModule, SharedModule, RouterTestingModule],
+ imports: [FormsModule, SharedModule, RouterTestingModule],
providers: [NgbActiveModal]
});
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';
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
SharedModule,
SelectModule
],
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';
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
GridModule,
InputModule,
SelectModule,
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<SmbClusterListComponent>;
BrowserAnimationsModule,
SharedModule,
HttpClientTestingModule,
- ToastrModule.forRoot(),
RouterTestingModule
],
declarations: [SmbClusterListComponent]
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';
declarations: [SmbDomainSettingModalComponent],
imports: [
SharedModule,
- ToastrModule.forRoot(),
ReactiveFormsModule,
HttpClientTestingModule,
RouterTestingModule,
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';
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [ToastrModule.forRoot(), SharedModule, ReactiveFormsModule],
+ imports: [SharedModule, ReactiveFormsModule],
declarations: [SmbJoinAuthFormComponent],
providers: [provideHttpClient(), provideHttpClientTesting(), provideRouter([])]
}).compileComponents();
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', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [SmbJoinAuthListComponent],
- imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule]
+ imports: [SharedModule, HttpClientTestingModule, RouterTestingModule]
}).compileComponents();
fixture = TestBed.createComponent(SmbJoinAuthListComponent);
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,
HttpClientTestingModule,
RouterTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
GridModule,
InputModule,
NumberModule,
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', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [ToastrModule.forRoot(), SharedModule],
+ imports: [SharedModule],
declarations: [SmbShareListComponent],
providers: [provideHttpClient(), provideHttpClientTesting()]
}).compileComponents();
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';
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [ToastrModule.forRoot(), SharedModule, ReactiveFormsModule],
+ imports: [SharedModule, ReactiveFormsModule],
declarations: [SmbUsersgroupsFormComponent],
providers: [provideHttpClient(), provideHttpClientTesting(), provideRouter([])]
}).compileComponents();
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', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [SmbUsersgroupsListComponent],
- imports: [SharedModule, HttpClientTestingModule, ToastrModule.forRoot(), RouterTestingModule]
+ imports: [SharedModule, HttpClientTestingModule, RouterTestingModule]
}).compileComponents();
fixture = TestBed.createComponent(SmbUsersgroupsListComponent);
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';
RouterTestingModule,
ReactiveFormsModule,
ComponentsModule,
- ToastrModule.forRoot(),
SharedModule
],
declarations: [LoginPasswordFormComponent]
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';
RouterTestingModule.withRoutes(routes),
HttpClientTestingModule,
ReactiveFormsModule,
- ToastrModule.forRoot(),
SharedModule
],
declarations: [RoleFormComponent, FakeComponent]
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';
imports: [
BrowserAnimationsModule,
SharedModule,
- ToastrModule.forRoot(),
NgbNavModule,
RouterTestingModule,
HttpClientTestingModule
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';
HttpClientTestingModule,
ReactiveFormsModule,
ComponentsModule,
- ToastrModule.forRoot(),
SharedModule,
NgbPopoverModule
],
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';
imports: [
BrowserAnimationsModule,
SharedModule,
- ToastrModule.forRoot(),
NgbNavModule,
RouterTestingModule,
HttpClientTestingModule
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';
RouterTestingModule,
ReactiveFormsModule,
ComponentsModule,
- ToastrModule.forRoot(),
SharedModule
],
declarations: [UserPasswordFormComponent]
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';
configureTestBed({
declarations: [ErrorComponent],
- imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, ToastrModule.forRoot()]
+ imports: [HttpClientTestingModule, RouterTestingModule, SharedModule]
});
beforeEach(() => {
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';
let fixture: ComponentFixture<WorkbenchLayoutComponent>;
configureTestBed({
- imports: [RouterTestingModule, ToastrModule.forRoot(), PipesModule, HttpClientTestingModule],
+ imports: [RouterTestingModule, PipesModule, HttpClientTestingModule],
declarations: [WorkbenchLayoutComponent],
schemas: [NO_ERRORS_SCHEMA],
providers: [AuthStorageService, CssHelper, RbdService]
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';
imports: [
HttpClientTestingModule,
SharedModule,
- ToastrModule.forRoot(),
RouterTestingModule,
SimplebarAngularModule,
NgbModule,
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<NotificationAreaComponent>;
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';
};
configureTestBed({
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
declarations: [NotificationsComponent],
providers: [{ provide: NotificationService, useValue: notificationServiceMock }]
});
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';
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;
import { configureTestBed } from '~/testing/unit-test-helper';
import { CephfsService } from './cephfs.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-
describe('DirectoryStoreService', () => {
let service: DirectoryStoreService;
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';
configureTestBed({
declarations: [MgrModuleListComponent],
- imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot()],
+ imports: [HttpClientTestingModule, SharedModule],
providers: [MgrModuleService]
});
import { MultiClusterService } from './multi-cluster.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-
describe('MultiClusterService', () => {
let service: MultiClusterService;
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 = [
configureTestBed({
providers: [RgwMultisiteService],
- imports: [
- HttpClientTestingModule,
- BlockUIModule.forRoot(),
- ToastrModule.forRoot(),
- SharedModule
- ]
+ imports: [HttpClientTestingModule, BlockUIModule.forRoot(), SharedModule]
});
beforeEach(() => {
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';
configureTestBed({
providers: [SmbService, provideHttpClient(), provideHttpClientTesting()],
- imports: [ToastrModule.forRoot(), SharedModule]
+ imports: [SharedModule]
});
beforeEach(() => {
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';
configureTestBed({
declarations: [DateTimePickerComponent],
- imports: [DatePickerModule, FormsModule, TimePickerModule, TimePickerSelectModule]
+ imports: [DatePickerModule, TimePickerModule, TimePickerSelectModule]
});
beforeEach(() => {
+++ /dev/null
-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<NotificationsSidebarComponent>;
- 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();
- }));
- });
-});
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';
configureTestBed({
declarations: [TelemetryNotificationComponent, AlertPanelComponent],
- imports: [
- NgbAlertModule,
- HttpClientTestingModule,
- ToastrModule.forRoot(),
- PipesModule,
- BlockUIModule.forRoot()
- ],
+ imports: [NgbAlertModule, HttpClientTestingModule, PipesModule, BlockUIModule.forRoot()],
providers: [MgrModuleService, UserService]
});
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';
PipesModule,
NgbTooltipModule,
RouterTestingModule,
- HttpClientTestingModule,
- ToastrModule.forRoot()
+ HttpClientTestingModule
]
});
beforeEach(() => {
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';
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';
describe('CrudFormComponent', () => {
let component: CrudFormComponent;
let fixture: ComponentFixture<CrudFormComponent>;
- 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({
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';
providers: [
NotificationService,
{
- provide: ToastrService,
useValue: {
error: () => true
}
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';
};
configureTestBed({
- imports: [RouterTestingModule.withRoutes(routes), ToastrModule.forRoot(), SharedModule],
+ imports: [RouterTestingModule.withRoutes(routes), SharedModule],
providers: [
ModuleStatusGuardService,
{ provide: HttpClient, useValue: fakeService },
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';
let prometheus: PrometheusHelper;
configureTestBed({
- imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule],
+ imports: [SharedModule, HttpClientTestingModule],
providers: [PrometheusAlertFormatter]
});
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';
let prometheus: PrometheusHelper;
configureTestBed({
- imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule],
+ imports: [SharedModule, HttpClientTestingModule],
providers: [PrometheusAlertService, PrometheusAlertFormatter]
});
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';
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(() => {
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';
let service: TaskWrapperService;
configureTestBed({
- imports: [HttpClientTestingModule, ToastrModule.forRoot(), SharedModule, RouterTestingModule],
+ imports: [HttpClientTestingModule, SharedModule, RouterTestingModule],
providers: [TaskWrapperService]
});