From f203cc418f39b51f2510e462243b84acdea2bec5 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Thu, 9 Aug 2018 19:09:30 +0530 Subject: 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 --- src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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(); + }); }); -- cgit 1.2.3-korg