From 877e33480259adcf3cce978bc0ec2599e9563fbd Mon Sep 17 00:00:00 2001 From: Rupinder Date: Sat, 25 Jan 2020 13:19:56 +0530 Subject: Added test case for form-field component Written test cases for form-field component Issue-ID: PORTAL-808 Change-Id: I3b5ce9c53b0203ca357b2601b013dbe2a9c6b9fe Signed-off-by: Rupinder --- .../Report/form-fields/form-fields.component.spec.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ecomp-sdk/epsdk-app-overlay') 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 a2870461..eeb76e26 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 @@ -44,4 +44,22 @@ describe('FormFieldsComponent', () => { expect(component.showDefaultSQLOption).toEqual(true); }) + it('should test close function', () => { + component.close(); + expect(component.closable).toEqual(false); + }); + + it('should test closeValidateModal', () => { + component.closeValidateModal(); + expect(component.showSpinner).toEqual(false); + }); + + it('should test openDialog method', () => { + expect(component.openDialog()).toHaveBeenCalled; + }); + + it('should test openSnackBar method', () => { + expect(component.openSnackBar("Just", "for testing")).toHaveBeenCalled; + }) + }); -- cgit 1.2.3-korg