From: Arundathi Patil Date: Thu, 9 Aug 2018 13:39:30 +0000 (+0530) Subject: build-artifacts - added test case X-Git-Tag: 1.4.0~49 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=f203cc418f39b51f2510e462243b84acdea2bec5;p=appc%2Fcdt.git build-artifacts - added test case wrote test case to test checkRefDataReqFields() funtion when action, device-protocol and scope values are set to blank. Issue-ID: APPC-1064 Change-Id: I405aca5092e631183e690bcd60b10439f1396568 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 25365bb..af711da 100644 --- a/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts +++ b/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts @@ -168,4 +168,13 @@ describe('BuildDesignComponent', () => { expect(spy).toHaveBeenCalled(); }); + + it('Should notify error message if action, deviceprotocol and scope are blank ', () => { + let spy = spyOn(NotificationsService.prototype, 'error'); + component.refList = {"action": "", "scope": {"vnf-type": ""}, "device-protocol": ""}; + + component.checkRefDataReqFields(); + + expect(spy).toHaveBeenCalled(); + }); });