Written test cases for form-field component
Issue-ID: PORTAL-808
Change-Id: I2a2f8ced127efe588929fa2caf83a9ba58ae0376
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
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);
+ })
});