Skip to content

Commit 0548f9e

Browse files
committed
test(hgrid virt): removing waitForAsync
1 parent fa5307e commit 0548f9e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.virtualization.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { configureTestSuite } from '../../test-utils/configure-suite';
2-
import { TestBed, waitForAsync } from '@angular/core/testing';
2+
import { TestBed } from '@angular/core/testing';
33
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
44
import { IgxHierarchicalGridModule } from './public_api';
55
import { Component, ViewChild } from '@angular/core';
@@ -29,11 +29,11 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
2929
});
3030
}));
3131

32-
beforeEach(waitForAsync(() => {
32+
beforeEach(() => {
3333
fixture = TestBed.createComponent(IgxHierarchicalGridTestBaseComponent);
3434
fixture.detectChanges();
3535
hierarchicalGrid = fixture.componentInstance.hgrid;
36-
}));
36+
});
3737

3838
it('should retain expansion state when scrolling.', async () => {
3939
const firstRow = hierarchicalGrid.dataRowList.toArray()[0] as IgxHierarchicalRowComponent;
@@ -264,23 +264,22 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
264264

265265
expect(
266266
hierarchicalGrid.verticalScrollContainer.state.startIndex +
267-
hierarchicalGrid.verticalScrollContainer.state.chunkSize)
268-
.toBe(80);
267+
hierarchicalGrid.verticalScrollContainer.state.chunkSize).toBe(80);
269268
expect(hierarchicalGrid.verticalScrollContainer.getScroll().scrollTop)
270-
.toEqual(hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight -
271-
parseInt(hierarchicalGrid.verticalScrollContainer.igxForContainerSize, 10));
269+
.toEqual(hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight -
270+
parseInt(hierarchicalGrid.verticalScrollContainer.igxForContainerSize, 10));
272271
});
273272

274273
it('should update scroll height after expanding/collapsing rows.', async () => {
275274
const scrHeight = hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight;
276275
const firstRow = hierarchicalGrid.dataRowList.toArray()[0];
277-
UIInteractions.simulateClickAndSelectEvent(firstRow.nativeElement.children[0]);
278-
fixture.detectChanges();
279-
await wait(200);
280-
const childGrid1 = hierarchicalGrid.gridAPI.getChildGrids(false)[0];
281-
expect(hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight)
276+
UIInteractions.simulateClickAndSelectEvent(firstRow.nativeElement.children[0]);
277+
fixture.detectChanges();
278+
await wait(200);
279+
const childGrid1 = hierarchicalGrid.gridAPI.getChildGrids(false)[0];
280+
expect(hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight)
282281
.toBeGreaterThan(scrHeight + childGrid1.calcHeight);
283-
expect(childGrid1.nativeElement.parentElement.className.indexOf('igx-grid__hierarchical-indent--scroll'))
282+
expect(childGrid1.nativeElement.parentElement.className.indexOf('igx-grid__hierarchical-indent--scroll'))
284283
.not.toBe(-1);
285284
});
286285

@@ -408,7 +407,8 @@ describe('IgxHierarchicalGrid Virtualization Custom Scenarios #hGrid', () => {
408407
IgxHierarchicalGridNoScrollTestComponent
409408
],
410409
imports: [
411-
NoopAnimationsModule, IgxHierarchicalGridModule]
410+
NoopAnimationsModule, IgxHierarchicalGridModule
411+
]
412412
});
413413
}));
414414

0 commit comments

Comments
 (0)