From f792671ae247a931f34d902e9276202b5016ef9a Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Sun, 7 Jul 2019 19:23:03 +0300 Subject: Merge from ecomp 718fd196 - Modern UI Issue-ID: VID-378 Change-Id: I2736b98426e324ec3aa233b034229ba84d99839f Signed-off-by: Ittay Stern --- .../auditInfoModal/auditInfoModal.component.spec.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.spec.ts') 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 { 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); -- cgit 1.2.3-korg