From 0812ff437b64baf1d0e69a19ad3d2331748ff140 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Wed, 4 Sep 2019 14:44:41 +0530 Subject: userlogin-form component test case Added test case to test ValidateUserName function Issue-ID: APPC-1632 Change-Id: Ib719952a698672ba0ffa99b2a71a1ebb1e55208f Signed-off-by: Arundathi Patil --- src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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); + }); + }); -- cgit 1.2.3-korg