build-artifacts - added test case 63/59863/1
authorArundathi Patil <arundpil@in.ibm.com>
Thu, 9 Aug 2018 13:39:30 +0000 (19:09 +0530)
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Thu, 9 Aug 2018 13:39:41 +0000 (19:09 +0530)
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 <arundpil@in.ibm.com>
src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts

index 25365bb..af711da 100644 (file)
@@ -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();
+    });
 });