summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.service.spec.ts21
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.service.spec.ts49
2 files changed, 66 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.service.spec.ts
index d7b3b648..872a5de4 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.service.spec.ts
@@ -2,15 +2,32 @@ import { TestBed } from '@angular/core/testing';
import { LogService } from './log.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { HttpClient } from '@angular/common/http';
+import { environment } from 'src/environments/environment';
describe('LogService', () => {
+
+ let service: LogService
+
beforeEach(() =>
+ {
TestBed.configureTestingModule({
- imports: [HttpClientTestingModule]
- }));
+ imports: [HttpClientTestingModule],
+ providers: [LogService, HttpClient, HttpClientTestingModule]
+ })
+ service = TestBed.get(LogService);
+
+});
it('should be created', () => {
const service: LogService = TestBed.get(LogService);
expect(service).toBeTruthy();
});
+
+ it('should getLogData', () => {
+ service.getLogData("test").subscribe((res) => {
+ expect(res).toBe(environment.baseUrl);
+ });
+ });
+
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.service.spec.ts
index b50fc923..45bf2433 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.service.spec.ts
@@ -2,15 +2,60 @@ import { TestBed } from '@angular/core/testing';
import { RunService } from './run.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { HttpClient } from '@angular/common/http';
+import { environment } from 'src/environments/environment';
describe('RunService', () => {
+ let service: RunService;
+
beforeEach(() =>
+ {
TestBed.configureTestingModule({
- imports: [HttpClientTestingModule]
- }));
+ imports: [HttpClientTestingModule],
+ providers: [HttpClient, HttpClientTestingModule, RunService]
+ });
+
+ service = TestBed.get(RunService);
+});
it('should be created', () => {
const service: RunService = TestBed.get(RunService);
expect(service).toBeTruthy();
});
+
+ it('should getReportData', () => {
+ service.getReportData("test").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should getReportDataWithFormFields', () => {
+ service.getReportDataWithFormFields("just", "testing").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should getDefinitionPageDetails', () => {
+ service.getDefinitionPageDetails(1).subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should refreshFormFields', () => {
+ service.refreshFormFields("just", "testing").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should getFormFieldGroupsData', () => {
+ service.getFormFieldGroupsData("test").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should downloadReportExcel', () => {
+ service.downloadReportExcel("test").subscribe((res) => {
+ expect(res).toBe(new Blob);
+ });
+ });
});