summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-02-27 18:16:38 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-02-27 18:16:44 +0530
commit698cb92a5a5ebf2852ba1fe20feb0994874ca3cf (patch)
tree5a303e19d6bbce8e865490a744c2363058469e81 /ecomp-sdk
parent37db40a2dc6e811e919b912579fbbb2b1d8cedba (diff)
added test case for run component
Wrote test case for run.component.spec.ts Issue-ID: PORTAL-834 Change-Id: Ic2fe3cbf996c34c9fd5bbb22bcf6187cf311d092 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/run/run.component.spec.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.spec.ts
index e9439dda..82eda851 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.spec.ts
@@ -1,6 +1,8 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RunComponent } from './run.component';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { RouterTestingModule } from '@angular/router/testing';
describe('RunComponent', () => {
let component: RunComponent;
@@ -8,7 +10,8 @@ describe('RunComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ RunComponent ]
+ declarations: [ RunComponent ],
+ imports: [HttpClientTestingModule, RouterTestingModule]
})
.compileComponents();
}));
@@ -22,4 +25,11 @@ describe('RunComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should test ngOnInit method', () => {
+ component.ngOnInit();
+ component.reportType !== "Dashboard";
+ expect(component.stepNo).toEqual("8");
+ });
+
});