From 7509cd4976b4a6cda9076f14a75c68b29b0d8921 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 7 Aug 2018 15:24:52 +0530 Subject: build-artifacts component : added test case wrote test case to test checkRefDataReqFields() function to notify error message when no valid template identifier is selected. Issue-ID: APPC-1064 Change-Id: I083abfd29aac325938116c5acc604e737a0d09ae Signed-off-by: Arundathi Patil --- src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts b/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts index a6ba8c3..25365bb 100644 --- a/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts +++ b/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts @@ -159,4 +159,13 @@ describe('BuildDesignComponent', () => { component.updateAccessUpdatePages('config', [{'action' : 'configModify'}]); expect(component.setAllowOtherUpdates).toHaveBeenCalledWith(false); }); + + it('Should notify error message if no valid template identifier', () => { + let spy = spyOn(NotificationsService.prototype, 'error'); + component.refList = {"action": "ConfigScaleOut", "scope": {"vnf-type": "test 1"}, "device-protocol": ""}; + + component.checkRefDataReqFields(); + + expect(spy).toHaveBeenCalled(); + }); }); -- cgit 1.2.3-korg