From f8fba31298fa61a0ffd3c00960aa6ae1fbb8a4c0 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Sun, 17 Nov 2019 13:08:24 +0530 Subject: parameter component- spec fixes Fixed failing test case Issue-ID: APPC-1632 Change-Id: I9dffd1a0d949427bf9a7145f87c7acee7d57ae9e Signed-off-by: Arundathi Patil --- .../parameter.component.spec.ts | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.spec.ts b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.spec.ts index 044b04b..3791400 100644 --- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.spec.ts +++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.spec.ts @@ -128,11 +128,30 @@ describe('ParameterComponent', () => { expect(component.getPD()); }); - it('should infer some information from reference object...', inject([MappingEditorService], (mappingEditorService: MappingEditorService) => { - mappingEditorService.latestAction = {"action":"Configure","action-level":"vnf","scope":{"vnf-type":"ticktack","vnfc-type":""},"template":"Y","vm":[],"device-protocol":"CHEF","user-name":"","port-number":"","artifact-list":[{"artifact-name":"template_Configure_ticktack_0.0.1V.json","artifact-type":"config_template"},{"artifact-name":"pd_Configure_ticktack_0.0.1V.yaml","artifact-type":"parameter_definitions"}],"scopeType":"vnf-type"}; + fit('should infer some information from reference object...', inject([MappingEditorService, UtilityService], (mappingEditorService: MappingEditorService, utilityService: UtilityService) => { + // mappingEditorService.latestAction = {"action":"Configure","action-level":"vnf","scope":{"vnf-type":"ticktack","vnfc-type":""},"template":"Y","vm":[],"device-protocol":"CHEF","user-name":"","port-number":"","artifact-list":[{"artifact-name":"template_Configure_ticktack_0.0.1V.json","artifact-type":"config_template"},{"artifact-name":"pd_Configure_ticktack_0.0.1V.yaml","artifact-type":"parameter_definitions"}],"scopeType":"vnf-type"}; + mappingEditorService.newObject = {"action":"Configure", + "vnfc": "vnfcType", + "action-level":"vnf", + "scope":{"vnf-type":"ticktack","vnfc-type":""}, + "template":"Y", + "vm":[], + "device-protocol":"CHEF", + "user-name":"", + "port-number":"", + "artifact-list":[ + {"artifact-name":"template_Configure_ticktack_0.0.1V.json", + "artifact-type":"config_template"}, + {"artifact-name":"pd_Configure_ticktack_0.0.1V.yaml", + "artifact-type":"parameter_definitions"} + ],"scopeType":"vnf-type", + "vnf": "ticktack", + "protocol": 'CHEF', + "pd_artifact": 'pd_Configure_ticktack_0.0.1V.yaml'}; + utilityService.setTracelvl(1); expect(component.ngOnInit()); expect(component.vnfType).toEqual('ticktack'); - expect(component.vnfcType).toEqual(''); + expect(component.vnfcType).toEqual('vnfcType'); expect(component.protocol).toEqual('CHEF'); expect(component.action).toEqual('Configure'); expect(component.artifact_fileName).toEqual('pd_Configure_ticktack_0.0.1V.yaml'); -- cgit 1.2.3-korg