summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-09-04 14:44:41 +0530
committerTakamune Cho <takamune.cho@att.com>2019-09-06 17:51:27 +0000
commit0812ff437b64baf1d0e69a19ad3d2331748ff140 (patch)
tree380c5215e8ebd1126f2cbda4f5c5458106f9cd84
parent24df8b02ff6c40196756c4091260827e900eb66f (diff)
userlogin-form component test case
Added test case to test ValidateUserName function Issue-ID: APPC-1632 Change-Id: Ib719952a698672ba0ffa99b2a71a1ebb1e55208f Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r--src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts b/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts
index ea97439..712d1bf 100644
--- a/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts
+++ b/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts
@@ -102,5 +102,12 @@ describe('userloginFormComponent', () => {
expect(localStorage['userId']).toBe('test Usr');
}));
+ it('test validateUserName function', () => {
+ component.userId = '';
+ component.validateUserName();
+ expect(component.errorMessage).toEqual('');
+ expect(component.invalid).toEqual(true);
+ });
+
});