3aa4713fce2c7371ebc3a156b18849dfe313b4e4
[portal/sdk.git] /
1 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
3 import { RunComponent } from './run.component';
4 import { HttpClientTestingModule } from '@angular/common/http/testing';
5 import { RouterTestingModule } from '@angular/router/testing';
6
7 describe('RunComponent', () => {
8   let component: RunComponent;
9   let fixture: ComponentFixture<RunComponent>;
10
11   beforeEach(async(() => {
12     TestBed.configureTestingModule({
13       declarations: [ RunComponent ],
14       imports: [HttpClientTestingModule, RouterTestingModule]
15     })
16     .compileComponents();
17   }));
18
19   beforeEach(() => {
20     fixture = TestBed.createComponent(RunComponent);
21     component = fixture.componentInstance;
22     fixture.detectChanges();
23   });
24
25   it('should create', () => {
26     expect(component).toBeTruthy();
27   });
28
29   it('should test ngOnInit method', () => {
30     component.reportType = "Dashboard";
31     component.ngOnInit();
32     expect(component.stepNo).toEqual("4");
33
34     component.reportType = "test";
35     component.ngOnInit();
36     expect(component.stepNo).toEqual("8");
37   });
38
39 });