From d4f19e036c5a71cef911c1d50f0683da848916fb Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 4 Sep 2018 11:42:00 +0530 Subject: reference-dataform.component.spec- fixed test case Fixed few of the errors which caused test case failures Issue-ID: APPC-1064 Change-Id: I22ff94900b608b3132848c76a418701df40d3d2c Signed-off-by: Arundathi Patil --- .../reference-dataform.component.spec.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/app/vnfs/build-artifacts') 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 77f1778..bef89e5 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 @@ -204,7 +204,8 @@ describe('ReferenceDataformComponent', () => { 'user-name': '', 'port-number': '', 'artifact-list': [] - } + }; + component.vnfcIdentifier = '346'; component.prepareReferenceObject(); expect(component.referenceDataObject['action-level']).toBe("vnf") }) @@ -225,7 +226,7 @@ describe('ReferenceDataformComponent', () => { 'port-number': '', 'artifact-list': [] } - + component.vnfcIdentifier = '346'; component.prepareReferenceObject(); expect(component.referenceDataObject['action-level']).toBe("vnfc") }) @@ -331,7 +332,8 @@ describe('ReferenceDataformComponent', () => { 'user-name': '', 'port-number': '', 'artifact-list': [] - } + }; + component.vnfcIdentifier = '346'; component.prepareReferenceObject(); expect(component.referenceDataObject['action-level']).toBe("vnf") }) @@ -784,6 +786,14 @@ describe('ReferenceDataformComponent', () => { expect(fileSaved).toBe(undefined) }) it('Save to appc file - should not process if device protocol is null ', () => { + component.tempAllData = [ + { + action: "Configure", + scope: { + 'vnf-type': "testVnf" + } + } + ] component.referenceDataObject.action = "Configure" component.referenceDataObject['device-protocol'] = "test" component.appData.template.templateData = { "test": "test" } @@ -792,7 +802,7 @@ describe('ReferenceDataformComponent', () => { component.actionChanged = true component.currentAction = "COnfigure" let fileSaved = component.saveToAppc(); - //expect(fileSaved).toBe(undefined) + expect(fileSaved).toBe(undefined) }) // it('uploadfile ', () => { let files = { 0: {name:'foo.XLS', size: -- cgit 1.2.3-korg