diff options
Diffstat (limited to 'src/app/vnfs/myvnfs/myvnfs.component.spec.ts')
-rw-r--r-- | src/app/vnfs/myvnfs/myvnfs.component.spec.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/app/vnfs/myvnfs/myvnfs.component.spec.ts b/src/app/vnfs/myvnfs/myvnfs.component.spec.ts index 5220931..0e1d1ff 100644 --- a/src/app/vnfs/myvnfs/myvnfs.component.spec.ts +++ b/src/app/vnfs/myvnfs/myvnfs.component.spec.ts @@ -203,4 +203,22 @@ describe('MyvnfsComponent', () => { expect(component.errorMessage).toBe(''); expect(component.invalid).toBe(false); }); + + it('should test buildNewDesign method with respons yes', ()=> { + component.vnfType = 'ABC'; + component.vnfcRequired = true; + component.buildNewDesign('yes'); + let vnfparams = sessionStorage.getItem('vnfParams'); + let vnfcSelectionFlag = sessionStorage.getItem('vnfcSelectionFlag'); + expect(vnfparams).toBe('{"vnfType":"ABC"}'); + expect(vnfcSelectionFlag).toBe("true"); + }); + + it('should test buildNewDesign method with response other than yes', ()=> { + component.vnfType = 'ABC'; + component.vnfcRequired = true; + component.buildNewDesign('No'); + let vnfparams = sessionStorage.getItem('vnfParams'); + expect(vnfparams).toBe(""); + }); });
\ No newline at end of file |