summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-01-25 11:51:43 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-01-25 11:55:07 +0530
commit612a7f2f661763d5933274d8e62a672f01e69971 (patch)
treebc27a01a512d7d48309422b923168122434d42bd /ecomp-sdk
parent3296f8d0d530dea510e3ad65bec0e27c3f52037f (diff)
Added test case for form-fields component
Written test cases for form-fields component Issue-ID: PORTAL-808 Change-Id: Ifaedc38493bf8e89ce5b3a3cfba2782a54a66665 Signed-off-by: Rupinder<rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts17
1 files changed, 15 insertions, 2 deletions
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 ba690f17..a2870461 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
@@ -28,7 +28,20 @@ describe('FormFieldsComponent', () => {
})
it('should test isLast functions', () =>{
- component.formFieldsListObj.length = 4;
- expect(component.isLast(3)).toEqual(true);
+ component.formFieldsListObj = [1,2,3,4,5];
+ let test: Boolean = component.isLast(3);
+ expect(test).toEqual(false);
})
+
+ it('should test isFirst function', () => {
+ let test: Boolean = component.isFirst(0);
+ expect(test).toEqual(true);
+ })
+
+ it('should test ngDoCheck', () => {
+ component.sqlAsDefaultValue = true;
+ component.ngDoCheck();
+ expect(component.showDefaultSQLOption).toEqual(true);
+ })
+
});