From: Rupinder Date: Sat, 25 Jan 2020 07:49:56 +0000 (+0530) Subject: Added test case for form-field component X-Git-Tag: 3.0.0~101 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=877e33480259adcf3cce978bc0ec2599e9563fbd;p=portal%2Fsdk.git 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 --- 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; + }) + });