Wrote test case to test and cover displayHandleVnfc function when vnfc
variable in mapping-editor.sevice is true.
Issue-ID: APPC-1064
Change-Id: Ia90c1c9a50540d32776f251f49444d0ac165f789
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
expect(component.vnfcIdentifier).toBe('346');
}));
+ it('should test displayHideVnfc function vnfc is true', inject([MappingEditorService], (service: MappingEditorService) => {
+ component.referenceDataObject = {
+ action: 'ConfigScaleOut',
+ 'action-level': 'vnf',
+ scope: {
+ 'vnf-type': '',
+ 'vnfc-type-list': ['346']
+ },
+ 'template': 'Y',
+ vm: [],
+ 'device-protocol': '',
+ 'user-name': '',
+ 'port-number': '',
+ 'artifact-list': []
+ };
+ service.newObject = { vnfc: true};
+ component.displayHideVnfc();
+ expect(component.vnfcIdentifier).toBe(true);
+ }));
+
// afterEach(function() {
// jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
// });