File tree Expand file tree Collapse file tree
e2e/testcafe-devextreme/tests/dataGrid/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,6 +238,41 @@ test('Page index should not reset when scrolling while the grid is being refresh
238238 height : 440 ,
239239} ) ) ;
240240
241+ test ( 'Pager info should show page 1 of 1 after changing pageSize to \'all\' with virtual scrolling' , async ( t ) => {
242+ const dataGrid = new DataGrid ( '#container' ) ;
243+ const pager = dataGrid . getPager ( ) ;
244+
245+ await t
246+ . click ( pager . getNavPage ( '5' ) . element )
247+ . expect ( pager . getNavPage ( '5' ) . selected )
248+ . ok ( )
249+ . expect ( pager . getInfoText ( ) . textContent )
250+ . eql ( 'Page 5 of 10 (50 items)' ) ;
251+
252+ await t
253+ . click ( pager . getPageSize ( 1 ) . element )
254+ . expect ( pager . getInfoText ( ) . textContent )
255+ . eql ( 'Page 1 of 1 (50 items)' ) ;
256+ } ) . before ( async ( ) => createWidget ( 'dxDataGrid' , {
257+ dataSource : [ ...new Array ( 50 ) . keys ( ) ] . map ( ( i ) => ( { id : i } ) ) ,
258+ keyExpr : 'id' ,
259+ showBorders : true ,
260+ scrolling : {
261+ mode : 'virtual' ,
262+ } ,
263+ paging : {
264+ pageSize : 5 ,
265+ } ,
266+ pager : {
267+ visible : true ,
268+ allowedPageSizes : [ 5 , 'all' ] ,
269+ showPageSizeSelector : true ,
270+ showInfo : true ,
271+ showNavigationButtons : true ,
272+ } ,
273+ height : 400 ,
274+ } ) ) ;
275+
241276test ( 'No error should occur if dataSource is not defined and pageIndex is promise chained (T1256070)' , async ( t ) => {
242277 const dataGrid = new DataGrid ( '#container' ) ;
243278
You can’t perform that action at this time.
0 commit comments