From eaa0dd2a148afd537cbe3961c5fa3e40b9221c94 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 11 Sep 2018 16:09:29 +0530 Subject: reference-dataform.component: added test case 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 --- .../reference-dataform.component.spec.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts index e69b8f8..499de2a 100644 --- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts +++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts @@ -1108,6 +1108,26 @@ describe('ReferenceDataformComponent', () => { 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; // }); -- cgit 1.2.3-korg