1 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3 import { MatPaginatorModule } from '@angular/material/paginator';
4 import { MatSortModule } from '@angular/material/sort';
5 import { MatTableModule } from '@angular/material/table';
7 import { RunReportComponent } from './run-report.component';
9 describe('RunReportFinalTableComponent', () => {
10 let component: RunReportComponent;
11 let fixture: ComponentFixture<RunReportComponent>;
13 beforeEach(async(() => {
14 TestBed.configureTestingModule({
15 declarations: [ RunReportComponent ],
22 }).compileComponents();
26 fixture = TestBed.createComponent(RunReportComponent);
27 component = fixture.componentInstance;
28 fixture.detectChanges();
31 it('should compile', () => {
32 expect(component).toBeTruthy();
35 it('should test ngOnInit method ', () => {
37 expect(component.initialProcesses()).toHaveBeenCalled();
40 it('should test initialProcess method', () => {
41 component.DashboardReportObj.length = 1;
42 component.initialProcesses();
43 expect(component.options.scrollSpeed).toEqual(20);
46 it('should test showError method', () => {
47 component.showError("abc");
48 expect(component.error).toEqual(true);
49 expect(component.showSpinner).toEqual(false);
52 it('should test afterViewInitialProcesses method ', () =>{
53 component.DashboardReportObj.length === 0;
54 component.reportMode === "Regular";
55 component.initCnt == 0;
57 component.afterViewInitialProcesses();
58 expect(component.showMoreVert).toEqual(false);
59 expect(component.NEWdisplayedColumns).toEqual(new Array());