summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-04-29 10:49:42 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-29 10:49:42 +0000
commitd9e0ea414c448a37d3b6efb7b46b648739a4c8a5 (patch)
tree395ba12130245f370b624e965673453ccd3341eb /ecomp-sdk
parent714e325ab0e9008b80c50786a578c7f59f90fdb3 (diff)
parent154b5c21085784cdfd0643a731412a29a8825941 (diff)
Merge "test cases in run-report-form-fields comp"
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.spec.ts20
1 files changed, 9 insertions, 11 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.spec.ts
index a1906c85..54df7d82 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.spec.ts
@@ -19,7 +19,9 @@ describe('RunReportFormFieldsComponent', () => {
{
baseUrl: 'just for testing'
}
- ]
+ ];
+ var responseFormFieldGroups={"formFieldGroupsJSON":'{"Indrijeet":"kumar"}'};
+ var respObj={"formFieldList":{"value1":"value1"}};
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -30,12 +32,9 @@ describe('RunReportFormFieldsComponent', () => {
})
.compileComponents();
runService = TestBed.get(RunService);
- // spyOn(runService, 'getReportData').and.returnValue(Observable.of(environment));
- // spyOn(runService, 'getReportDataWithFormFields').and.returnValue(Observable.of(environment));
spyOn(runService, 'getDefinitionPageDetails').and.returnValue(Observable.of(environment));
spyOn(runService, 'refreshFormFields').and.returnValue(Observable.of(environment));
- // spyOn(runService, 'downloadReportExcel').and.returnValue(Observable.of(environment));
- spyOn(runService, 'getFormFieldGroupsData').and.returnValue(Observable.of(environment));
+
}));
beforeEach(() => {
@@ -127,11 +126,10 @@ describe('RunReportFormFieldsComponent', () => {
expect(component.ngOnInit).toHaveBeenCalled();
});
-// it('should test fetchAndPopulateFormFields method', () => {
-// spyOn(component, 'fetchAndPopulateFormFields').and.callThrough();
-// component.formFieldGroupObjList = null;
-// component.fetchAndPopulateFormFields(1, "test");
-// expect(component.fetchAndPopulateFormFields).toHaveBeenCalled();
-// });
+ it('should test fetchAndPopulateFormFields method', () => {
+ component.formFieldGroupObjList=[{"formFieldList":"formFieldList"}]
+ spyOn(runService, 'getFormFieldGroupsData').and.returnValue(Observable.of(responseFormFieldGroups));
+ component.fetchAndPopulateFormFields(respObj,"value2");
+ });
}); \ No newline at end of file