@@ -6,7 +6,7 @@ import { IgxGridModule, IgxGridCellComponent, IGridCellEventArgs } from './publi
66import { IgxGridComponent } from './grid.component' ;
77import { SampleTestData } from '../../test-utils/sample-test-data.spec' ;
88import { configureTestSuite } from '../../test-utils/configure-suite' ;
9- import { wait , UIInteractions } from '../../test-utils/ui-interactions.spec' ;
9+ import { wait , UIInteractions , waitForSelectionChange } from '../../test-utils/ui-interactions.spec' ;
1010import { setupGridScrollDetection } from '../../test-utils/helper-utils.spec' ;
1111import { SortingDirection } from '../../data-operations/sorting-expression.interface' ;
1212import { DefaultSortingStrategy } from '../../data-operations/sorting-strategy' ;
@@ -1894,21 +1894,19 @@ describe('IgxGrid Multi Row Layout - Keyboard navigation #grid', () => {
18941894 fix . detectChanges ( ) ;
18951895
18961896 GridFunctions . simulateGridContentKeydown ( fix , 'ArrowRight' , false , false , true ) ;
1897- await wait ( DEBOUNCETIME * 2 ) ;
1897+ await waitForSelectionChange ( fix . componentInstance . grid ) ;
18981898 fix . detectChanges ( ) ;
18991899
19001900 expect ( fix . componentInstance . selectedCell . value ) . toEqual ( fix . componentInstance . data [ 0 ] . Phone ) ;
19011901 expect ( fix . componentInstance . selectedCell . column . field ) . toMatch ( 'Phone' ) ;
19021902
19031903 GridFunctions . simulateGridContentKeydown ( fix , 'ArrowDown' ) ;
1904- await wait ( ) ;
19051904 fix . detectChanges ( ) ;
19061905
19071906 expect ( fix . componentInstance . selectedCell . value ) . toEqual ( fix . componentInstance . data [ 0 ] . Fax ) ;
19081907 expect ( fix . componentInstance . selectedCell . column . field ) . toMatch ( 'Fax' ) ;
19091908
19101909 GridFunctions . simulateGridContentKeydown ( fix , 'ArrowUp' ) ;
1911- await wait ( ) ;
19121910 fix . detectChanges ( ) ;
19131911
19141912 expect ( fix . componentInstance . selectedCell . value ) . toEqual ( fix . componentInstance . data [ 0 ] . Phone ) ;
0 commit comments