Skip to content

Commit d438e17

Browse files
committed
test(hgrid): scrolling test fix
1 parent 941bc84 commit d438e17

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
44
import { IgxHierarchicalGridModule } from './public_api';
55
import { Component, ViewChild, DebugElement} from '@angular/core';
66
import { IgxChildGridRowComponent, IgxHierarchicalGridComponent } from './hierarchical-grid.component';
7-
import { wait, UIInteractions, waitForSelectionChange, waitForGridScroll } from '../../test-utils/ui-interactions.spec';
7+
import { wait, UIInteractions, waitForSelectionChange } from '../../test-utils/ui-interactions.spec';
88
import { IgxRowIslandComponent } from './row-island.component';
99
import { By } from '@angular/platform-browser';
1010
import { IgxHierarchicalRowComponent } from './hierarchical-row.component';
@@ -194,9 +194,9 @@ describe('IgxHierarchicalGrid Navigation', () => {
194194

195195
const childGridContent = fixture.debugElement.queryAll(By.css(GRID_CONTENT_CLASS))[1];
196196
UIInteractions.triggerEventHandlerKeyDown('arrowdown', childGridContent, false, false, true);
197-
fixture.detectChanges();
198197
// wait for parent grid to complete scroll to child cell.
199-
await waitForGridScroll(hierarchicalGrid);
198+
await wait();
199+
fixture.detectChanges();
200200

201201
const selectedCell = fixture.componentInstance.selectedCell;
202202
expect(selectedCell.value).toBe(9);
@@ -227,8 +227,8 @@ describe('IgxHierarchicalGrid Navigation', () => {
227227

228228
const childGridContent = fixture.debugElement.queryAll(By.css(GRID_CONTENT_CLASS))[1];
229229
UIInteractions.triggerEventHandlerKeyDown('arrowdown', childGridContent, false, false, true);
230-
fixture.detectChanges();
231230
await wait();
231+
fixture.detectChanges();
232232

233233
const childLastRowCell = childGrid.dataRowList.toArray()[4].cells.toArray()[0];
234234
const selectedCell = fixture.componentInstance.selectedCell;
@@ -307,8 +307,8 @@ describe('IgxHierarchicalGrid Navigation', () => {
307307

308308
const childGrid = hierarchicalGrid.gridAPI.getChildGrids(false)[0];
309309
childGrid.verticalScrollContainer.scrollTo(9);
310-
fixture.detectChanges();
311310
await wait();
311+
fixture.detectChanges();
312312

313313
let currScrTop = childGrid.verticalScrollContainer.getScroll().scrollTop;
314314
expect(currScrTop).toBeGreaterThan(0);
@@ -317,8 +317,8 @@ describe('IgxHierarchicalGrid Navigation', () => {
317317
GridFunctions.focusCell(fixture, fCell);
318318

319319
UIInteractions.triggerEventHandlerKeyDown('arrowdown', baseHGridContent, false, false, false);
320-
fixture.detectChanges();
321320
await wait();
321+
fixture.detectChanges();
322322

323323
const childFirstCell = childGrid.dataRowList.toArray()[0].cells.toArray()[0];
324324
const selectedCell = fixture.componentInstance.selectedCell;

0 commit comments

Comments
 (0)