@@ -1551,11 +1551,12 @@ test('Last group should not disappear after collapsing another subgroup with vir
15511551 const dataGrid = new DataGrid ( '#container' ) ;
15521552 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
15531553
1554+ await t . expect ( dataGrid . isReady ( ) ) . ok ( ) ;
1555+
15541556 // act
15551557 await dataGrid . scrollTo ( t , { y : 200 } ) ;
1556- await t . wait ( 100 ) ;
1557- await dataGrid . scrollTo ( t , { y : 400 } ) ;
1558- await t . wait ( 500 ) ;
1558+ await dataGrid . scrollTo ( t , { y : 600 } ) ;
1559+ await t . expect ( dataGrid . isReady ( ) ) . ok ( ) ;
15591560
15601561 // assert
15611562 await testScreenshot ( t , takeScreenshot , `grid-${ scrollingMode } -scrolling-T1152498.png` , { element : '#container' } ) ;
@@ -1585,29 +1586,28 @@ test('Last group should not disappear after collapsing another subgroup with vir
15851586 } ,
15861587 } ) ;
15871588
1588- await t . wait ( 100 ) ;
1589+ const dataGrid = new DataGrid ( '#container' ) ;
1590+ await t . expect ( dataGrid . isReady ( ) ) . ok ( ) ;
15891591
15901592 // simulating async rendering in React
15911593 await ClientFunction ( ( ) => {
1592- const dataGrid = ( $ ( '#container' ) as any ) . dxDataGrid ( 'instance' ) ;
1594+ const dataGridInstance = ( $ ( '#container' ) as any ) . dxDataGrid ( 'instance' ) ;
15931595
15941596 // eslint-disable-next-line no-underscore-dangle
1595- dataGrid . getView ( 'rowsView' ) . _templatesCache = { } ;
1597+ dataGridInstance . getView ( 'rowsView' ) . _templatesCache = { } ;
15961598
15971599 // eslint-disable-next-line no-underscore-dangle
1598- dataGrid . _getTemplate = ( ) => ( {
1600+ dataGridInstance . _getTemplate = ( ) => ( {
15991601 render ( options ) {
16001602 setTimeout ( ( ) => {
16011603 ( $ ( options . container ) as any ) . append ( ( $ ( '<div/>' ) as any ) . text ( options . model . value ) ) ;
16021604 options . deferred ?. resolve ( ) ;
1603- } , 200 ) ;
1605+ } , 1000 ) ;
16041606 } ,
16051607 } ) ;
16061608
1607- dataGrid . repaint ( ) ;
1609+ dataGridInstance . repaint ( ) ;
16081610 } ) ( ) ;
1609-
1610- await t . wait ( 300 ) ;
16111611 } ) ;
16121612} ) ;
16131613
0 commit comments