@@ -2251,6 +2251,12 @@ fixture`Editing - ShowEditorAlways`
22512251test . meta ( { unstable : true } ) ( 'Cells should be focused correctly on click when cell editing mode is used with enabled showEditorAlways (T1037019)' , async ( t ) => {
22522252 const dataGrid = new DataGrid ( '#container' ) ;
22532253
2254+ const getStoredName = ClientFunction ( ( id : number ) => ( window as any ) . myStore
2255+ . byKey ( id )
2256+ . then ( ( item ) => item . Name ) ) ;
2257+
2258+ await t . expect ( dataGrid . isReady ( ) ) . ok ( ) ;
2259+
22542260 // act
22552261 await t
22562262 . click ( dataGrid . getDataCell ( 0 , 0 ) . getEditor ( ) . element ) ;
@@ -2265,9 +2271,10 @@ test.meta({ unstable: true })('Cells should be focused correctly on click when c
22652271 // act
22662272 await t
22672273 . typeText ( dataGrid . getDataCell ( 0 , 0 ) . getEditor ( ) . element , '1' )
2268- . wait ( 50 )
22692274 . click ( dataGrid . getDataCell ( 1 , 0 ) . getEditor ( ) . element ) ;
22702275
2276+ await t . expect ( getStoredName ( 1 ) ) . eql ( 'Name 11' ) ;
2277+
22712278 // assert
22722279 await t
22732280 . expect ( dataGrid . apiGetCellValue ( 0 , 0 ) )
@@ -2280,9 +2287,10 @@ test.meta({ unstable: true })('Cells should be focused correctly on click when c
22802287 // act
22812288 await t
22822289 . typeText ( dataGrid . getDataCell ( 1 , 0 ) . getEditor ( ) . element , '2' )
2283- . wait ( 50 )
22842290 . click ( dataGrid . getDataCell ( 2 , 0 ) . getEditor ( ) . element ) ;
22852291
2292+ await t . expect ( getStoredName ( 2 ) ) . eql ( 'Name 22' ) ;
2293+
22862294 // assert
22872295 await t
22882296 . expect ( dataGrid . apiGetCellValue ( 1 , 0 ) )
@@ -2295,9 +2303,10 @@ test.meta({ unstable: true })('Cells should be focused correctly on click when c
22952303 // act
22962304 await t
22972305 . typeText ( dataGrid . getDataCell ( 2 , 0 ) . getEditor ( ) . element , '3' )
2298- . wait ( 50 )
22992306 . click ( dataGrid . getDataCell ( 1 , 0 ) . getEditor ( ) . element ) ;
23002307
2308+ await t . expect ( getStoredName ( 3 ) ) . eql ( 'Name 33' ) ;
2309+
23012310 // assert
23022311 await t
23032312 . expect ( dataGrid . apiGetCellValue ( 2 , 0 ) )
@@ -2310,9 +2319,10 @@ test.meta({ unstable: true })('Cells should be focused correctly on click when c
23102319 // act
23112320 await t
23122321 . typeText ( dataGrid . getDataCell ( 1 , 0 ) . getEditor ( ) . element , '2' )
2313- . wait ( 50 )
23142322 . click ( dataGrid . getDataCell ( 0 , 0 ) . getEditor ( ) . element ) ;
23152323
2324+ await t . expect ( getStoredName ( 2 ) ) . eql ( 'Name 222' ) ;
2325+
23162326 // assert
23172327 await t
23182328 . expect ( dataGrid . apiGetCellValue ( 1 , 0 ) )
0 commit comments