summaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-11-17 13:08:24 +0530
committerArundathi Patil <arundpil@in.ibm.com>2019-11-17 13:08:30 +0530
commitf8fba31298fa61a0ffd3c00960aa6ae1fbb8a4c0 (patch)
tree75b437fe65fa7645fd574a276034d18efb229a4c /src/app/vnfs/build-artifacts
parentebb3b48452f9313e62ad76b96f13f0a10a7202cc (diff)
parameter component- spec fixes
Fixed failing test case Issue-ID: APPC-1632 Change-Id: I9dffd1a0d949427bf9a7145f87c7acee7d57ae9e Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts')
-rw-r--r--src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.spec.ts25
1 files 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');