Added test cases for form-field component 47/100747/1
authorRupinder <rupinsi1@in.ibm.com>
Fri, 24 Jan 2020 11:27:54 +0000 (16:57 +0530)
committerRupinder <rupinsi1@in.ibm.com>
Fri, 24 Jan 2020 11:29:00 +0000 (16:59 +0530)
Written test cases for form-field component

Issue-ID: PORTAL-808
Change-Id: I2a2f8ced127efe588929fa2caf83a9ba58ae0376
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 42544a7..ba690f1 100644 (file)
@@ -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);
+  })
 });