summaryrefslogtreecommitdiffstats
path: root/src/app/vnfs
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-09-04 11:42:00 +0530
committerTakamune Cho <tc012c@att.com>2018-09-04 19:07:29 +0000
commitd4f19e036c5a71cef911c1d50f0683da848916fb (patch)
treef60b41a867e9edd4b13d8c3bfd0892d84f64db8d /src/app/vnfs
parenta4083956ca455780fb3aa44819721f52bd71bbc2 (diff)
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 <arundpil@in.ibm.com>
Diffstat (limited to 'src/app/vnfs')
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts18
1 files changed, 14 insertions, 4 deletions
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: