@@ -4,7 +4,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
44import { IgxHierarchicalGridModule } from './public_api' ;
55import { Component , ViewChild , DebugElement } from '@angular/core' ;
66import { 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' ;
88import { IgxRowIslandComponent } from './row-island.component' ;
99import { By } from '@angular/platform-browser' ;
1010import { 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