import { ReactiveFormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
-import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders
-} from '../../../../../testing/unit-test-helper';
-import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
-import { NotificationService } from '../../../../shared/services/notification.service';
-import { SharedModule } from '../../../../shared/shared.module';
+import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service';
+import { NotificationService } from '~/app/shared/services/notification.service';
+import { SharedModule } from '~/app/shared/shared.module';
+import { configureTestBed, FormHelper } from '~/testing/unit-test-helper';
import { BootstrapImportModalComponent } from './bootstrap-import-modal.component';
describe('BootstrapImportModalComponent', () => {
SharedModule,
ToastrModule.forRoot()
],
- providers: [BsModalRef, BsModalService, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
component = fixture.componentInstance;
component.siteName = 'site-A';
- notificationService = TestBed.get(NotificationService);
+ notificationService = TestBed.inject(NotificationService);
spyOn(notificationService, 'show').and.stub();
- rbdMirroringService = TestBed.get(RbdMirroringService);
+ rbdMirroringService = TestBed.inject(RbdMirroringService);
formHelper = new FormHelper(component.importBootstrapForm);
describe('import token', () => {
beforeEach(() => {
spyOn(rbdMirroringService, 'refresh').and.stub();
- spyOn(component.modalRef, 'hide').and.callThrough();
+ spyOn(component.activeModal, 'close').and.callThrough();
fixture.detectChanges();
});