@@ -13,7 +13,7 @@ import type {
1313 GridGetRowsResponse ,
1414} from '@mui/x-data-grid' ;
1515import { spy } from 'sinon' ;
16- import { getCell , sleep } from 'test/utils/helperFn' ;
16+ import { actSleep , getCell } from 'test/utils/helperFn' ;
1717import { getKeyDefault } from '../hooks/features/dataSource/cache' ;
1818import { TestCache } from '../internals/utils' ;
1919
@@ -235,7 +235,7 @@ describe('<DataGrid /> - Data source', () => {
235235 await renderAndWaitForInitialFetch ( ) ;
236236
237237 await upsertFilterItem ( { id : 1 , field : 'id' , operator : 'contains' } ) ;
238- await sleep ( 50 ) ;
238+ await actSleep ( 50 ) ;
239239
240240 expect ( fetchRowsSpy . callCount ) . to . equal ( 1 ) ;
241241 } ) ;
@@ -244,7 +244,7 @@ describe('<DataGrid /> - Data source', () => {
244244 await renderAndWaitForInitialFetch ( ) ;
245245
246246 await upsertFilterItem ( { id : 1 , field : 'id' , operator : 'contains' } ) ;
247- await sleep ( 50 ) ;
247+ await actSleep ( 50 ) ;
248248 expect ( fetchRowsSpy . callCount ) . to . equal ( 1 ) ;
249249
250250 await upsertFilterItem ( { id : 1 , field : 'id' , operator : 'contains' , value : '1' } ) ;
@@ -280,7 +280,7 @@ describe('<DataGrid /> - Data source', () => {
280280 await act ( async ( ) => {
281281 apiRef . current ! . setFilterLogicOperator ( 'or' as GridLogicOperator ) ;
282282 } ) ;
283- await sleep ( 50 ) ;
283+ await actSleep ( 50 ) ;
284284
285285 expect ( fetchRowsSpy . callCount ) . to . equal ( 2 ) ;
286286 } ) ;
@@ -291,7 +291,7 @@ describe('<DataGrid /> - Data source', () => {
291291 await act ( async ( ) => {
292292 apiRef . current ! . setQuickFilterValues ( [ '' ] ) ;
293293 } ) ;
294- await sleep ( 50 ) ;
294+ await actSleep ( 50 ) ;
295295
296296 expect ( fetchRowsSpy . callCount ) . to . equal ( 1 ) ;
297297 } ) ;
@@ -312,7 +312,7 @@ describe('<DataGrid /> - Data source', () => {
312312 quickFilterLogicOperator : 'or' as GridLogicOperator ,
313313 } ) ;
314314 } ) ;
315- await sleep ( 50 ) ;
315+ await actSleep ( 50 ) ;
316316
317317 expect ( fetchRowsSpy . callCount ) . to . equal ( 2 ) ;
318318 } ) ;
0 commit comments