summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-08-07 15:24:52 +0530
committerTakamune Cho <tc012c@att.com>2018-08-07 15:15:36 +0000
commit7509cd4976b4a6cda9076f14a75c68b29b0d8921 (patch)
treebe7ec46de7740561ac0434ddbb6ba94157c56ed3 /src
parent3b247d43e994100d5a4fe386e272e6c191f20ac1 (diff)
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 <arundpil@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts9
1 files changed, 9 insertions, 0 deletions
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();
+ });
});