diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-07-07 19:23:03 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-07-08 16:13:43 +0300 |
commit | f792671ae247a931f34d902e9276202b5016ef9a (patch) | |
tree | 6104971e8074c9a3d720836276ff18619719ec02 /vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts | |
parent | fc62274e8d15964d63c62bf0e2f4abc040252ee9 (diff) |
Merge from ecomp 718fd196 - Modern UI
Issue-ID: VID-378
Change-Id: I2736b98426e324ec3aa233b034229ba84d99839f
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts index ecce68daf..5e39ee3ab 100644 --- a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts +++ b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts @@ -17,6 +17,7 @@ import {ServiceInfoModel} from "../../server/serviceInfo/serviceInfo.model"; import {HttpClient} from '@angular/common/http'; import {getTestBed} from "@angular/core/testing"; import {of} from 'rxjs'; +import {NodeInstance} from "../../models/nodeInstance"; class MockAppStore<T> { getState() { @@ -126,23 +127,21 @@ describe('Audit Info Modal Component_serviceInfoService', () => { const instanceId: string = "instanceID"; const type: string = 'VNF'; const model = {}; - const instance = {}; - const isInstanceFailed: boolean = true; - const trackById = "trackById"; + const instance: NodeInstance = new NodeInstance(); + instance.trackById = 'trackById'; + instance.isFailed= true; AuditInfoModalComponent.openInstanceAuditInfoModal.next({ instanceId: instanceId, type: type, model: model, - instance: instance, - isInstanceFailed: isInstanceFailed, - trackById: trackById + instance: instance }); expect(component.showVidStatus).toEqual(false); expect(component.initializeProperties).toHaveBeenCalled(); expect(component.setModalTitles).toHaveBeenCalled(); - expect(_serviceInfoService.getAuditStatusForRetry).toHaveBeenCalledWith(trackById); + expect(_serviceInfoService.getAuditStatusForRetry).toHaveBeenCalledWith(instance.trackById); expect(component.auditInfoModal.show).toHaveBeenCalled(); expect(AuditInfoModalComponentService.getInstanceModelName).toHaveBeenCalledWith(model); }); @@ -160,16 +159,12 @@ describe('Audit Info Modal Component_serviceInfoService', () => { const type: string = 'VNF'; const model = {}; const instance = {}; - const isInstanceFailed: boolean = false; - const trackById = "trackById"; AuditInfoModalComponent.openInstanceAuditInfoModal.next({ instanceId: instanceId, type: type, model: model, - instance: instance, - isInstanceFailed: isInstanceFailed, - trackById: trackById + instance: instance }); expect(component.showVidStatus).toEqual(false); |