From: Arundathi Patil Date: Tue, 7 Aug 2018 09:54:52 +0000 (+0530) Subject: build-artifacts component : added test case X-Git-Tag: 1.4.0~54 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F99%2F59399%2F2;p=appc%2Fcdt.git 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 --- 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(); + }); });