Added test case for form-field component 93/100793/1
authorRupinder <rupinsi1@in.ibm.com>
Sat, 25 Jan 2020 07:49:56 +0000 (13:19 +0530)
committerRupinder <rupinsi1@in.ibm.com>
Sat, 25 Jan 2020 07:51:13 +0000 (13:21 +0530)
Written test cases for form-field component
Issue-ID: PORTAL-808
Change-Id: I3b5ce9c53b0203ca357b2601b013dbe2a9c6b9fe
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts

index a287046..eeb76e2 100644 (file)
@@ -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;
+  })
+
 });