diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report-run/run/run.component.spec.ts')
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report-run/run/run.component.spec.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report-run/run/run.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report-run/run/run.component.spec.ts new file mode 100644 index 00000000..3aa4713f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report-run/run/run.component.spec.ts @@ -0,0 +1,39 @@ +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; + let fixture: ComponentFixture<RunComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RunComponent ], + imports: [HttpClientTestingModule, RouterTestingModule] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RunComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); + + it('should test ngOnInit method', () => { + component.reportType = "Dashboard"; + component.ngOnInit(); + expect(component.stepNo).toEqual("4"); + + component.reportType = "test"; + component.ngOnInit(); + expect(component.stepNo).toEqual("8"); + }); + +}); |