|
1 | 1 | import { configureTestSuite } from '../../test-utils/configure-suite'; |
2 | | -import { TestBed, waitForAsync } from '@angular/core/testing'; |
| 2 | +import { TestBed } from '@angular/core/testing'; |
3 | 3 | import { NoopAnimationsModule } from '@angular/platform-browser/animations'; |
4 | 4 | import { IgxHierarchicalGridModule } from './public_api'; |
5 | 5 | import { Component, ViewChild } from '@angular/core'; |
@@ -29,11 +29,11 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { |
29 | 29 | }); |
30 | 30 | })); |
31 | 31 |
|
32 | | - beforeEach(waitForAsync(() => { |
| 32 | + beforeEach(() => { |
33 | 33 | fixture = TestBed.createComponent(IgxHierarchicalGridTestBaseComponent); |
34 | 34 | fixture.detectChanges(); |
35 | 35 | hierarchicalGrid = fixture.componentInstance.hgrid; |
36 | | - })); |
| 36 | + }); |
37 | 37 |
|
38 | 38 | it('should retain expansion state when scrolling.', async () => { |
39 | 39 | const firstRow = hierarchicalGrid.dataRowList.toArray()[0] as IgxHierarchicalRowComponent; |
@@ -264,23 +264,22 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { |
264 | 264 |
|
265 | 265 | expect( |
266 | 266 | hierarchicalGrid.verticalScrollContainer.state.startIndex + |
267 | | - hierarchicalGrid.verticalScrollContainer.state.chunkSize) |
268 | | - .toBe(80); |
| 267 | + hierarchicalGrid.verticalScrollContainer.state.chunkSize).toBe(80); |
269 | 268 | 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)); |
272 | 271 | }); |
273 | 272 |
|
274 | 273 | it('should update scroll height after expanding/collapsing rows.', async () => { |
275 | 274 | const scrHeight = hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight; |
276 | 275 | 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) |
282 | 281 | .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')) |
284 | 283 | .not.toBe(-1); |
285 | 284 | }); |
286 | 285 |
|
@@ -408,7 +407,8 @@ describe('IgxHierarchicalGrid Virtualization Custom Scenarios #hGrid', () => { |
408 | 407 | IgxHierarchicalGridNoScrollTestComponent |
409 | 408 | ], |
410 | 409 | imports: [ |
411 | | - NoopAnimationsModule, IgxHierarchicalGridModule] |
| 410 | + NoopAnimationsModule, IgxHierarchicalGridModule |
| 411 | + ] |
412 | 412 | }); |
413 | 413 | })); |
414 | 414 |
|
|
0 commit comments