From 612a7f2f661763d5933274d8e62a672f01e69971 Mon Sep 17 00:00:00 2001 From: Rupinder Date: Sat, 25 Jan 2020 11:51:43 +0530 Subject: Added test case for form-fields component Written test cases for form-fields component Issue-ID: PORTAL-808 Change-Id: Ifaedc38493bf8e89ce5b3a3cfba2782a54a66665 Signed-off-by: Rupinder --- .../Report/form-fields/form-fields.component.spec.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'ecomp-sdk/epsdk-app-overlay/src/main') 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 ba690f17..a2870461 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 @@ -28,7 +28,20 @@ describe('FormFieldsComponent', () => { }) it('should test isLast functions', () =>{ - component.formFieldsListObj.length = 4; - expect(component.isLast(3)).toEqual(true); + component.formFieldsListObj = [1,2,3,4,5]; + let test: Boolean = component.isLast(3); + expect(test).toEqual(false); }) + + it('should test isFirst function', () => { + let test: Boolean = component.isFirst(0); + expect(test).toEqual(true); + }) + + it('should test ngDoCheck', () => { + component.sqlAsDefaultValue = true; + component.ngDoCheck(); + expect(component.showDefaultSQLOption).toEqual(true); + }) + }); -- cgit 1.2.3-korg