From 3296f8d0d530dea510e3ad65bec0e27c3f52037f Mon Sep 17 00:00:00 2001 From: Rupinder Date: Fri, 24 Jan 2020 16:57:54 +0530 Subject: [PATCH] Added test cases for form-field component Written test cases for form-field component Issue-ID: PORTAL-808 Change-Id: I2a2f8ced127efe588929fa2caf83a9ba58ae0376 Signed-off-by: Rupinder --- .../Report/form-fields/form-fields.component.spec.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts index 42544a72..ba690f17 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts @@ -17,9 +17,18 @@ describe('FormFieldsComponent', () => { fixture = TestBed.createComponent(FormFieldsComponent); component = fixture.componentInstance; fixture.detectChanges(); - }); + }); it('should create', () => { expect(component).toBeTruthy(); }); + + it('should test ngOnInit function', () => { + component.ngOnInit(); + }) + + it('should test isLast functions', () =>{ + component.formFieldsListObj.length = 4; + expect(component.isLast(3)).toEqual(true); + }) }); -- 2.16.6