aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/vnfs/build-artifacts')
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts22
1 files changed, 22 insertions, 0 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 499de2a..fa8ed1a 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
@@ -1128,6 +1128,28 @@ describe('ReferenceDataformComponent', () => {
expect(component.vnfcIdentifier).toBe(true);
}));
+ it('should test validateDataAndSaveToAppc function', ()=>{
+ component.tempAllData = [{
+ action: "Configure",
+ scope: {
+ 'vnf-type': "testVnf"
+ }
+ },{
+ action: "StartApplication",
+ scope: {
+ 'vnf-type': "testVnf"
+ }
+ }
+ ];
+ component.actionChanged = true;
+ component.currentAction = 'Config';
+ let spy = spyOn(ReferenceDataformComponent.prototype, 'populateExistinAction');
+ component.validateDataAndSaveToAppc(true, {}, {});
+ expect(spy).toHaveBeenCalled();
+ expect(component.referenceDataObject.action).toBe('Config')
+ });
+
+
// afterEach(function() {
// jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
// });