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