diff --git a/packages/x-data-grid-pro/src/tests/dataSourceLazyLoader.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/dataSourceLazyLoader.DataGridPro.test.tsx index 5f7a2958365bd..4f4cf1b283793 100644 --- a/packages/x-data-grid-pro/src/tests/dataSourceLazyLoader.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/dataSourceLazyLoader.DataGridPro.test.tsx @@ -141,7 +141,7 @@ describeSkipIf(isJSDOM)(' - Data source lazy loader', () => { }); }); - it('should keep the scroll position when sorting is applied', async () => { + it('should reset the scroll position when sorting is applied', async () => { render(); // wait until the rows are rendered await waitFor(() => expect(getRow(0)).not.to.be.undefined); @@ -169,7 +169,7 @@ describeSkipIf(isJSDOM)(' - Data source lazy loader', () => { }); const afterSortSearchParams = new URL(fetchRowsSpy.lastCall.args[0]).searchParams; - expect(afterSortSearchParams.get('end')).to.equal(beforeSortSearchParams.get('end')); + expect(afterSortSearchParams.get('end')).to.equal('9'); }); it('should reset the scroll position when filter is applied', async () => { diff --git a/packages/x-data-grid-pro/src/tests/statePersistence.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/statePersistence.DataGridPro.test.tsx index 0edd9e0655014..c764ac4a1ef57 100644 --- a/packages/x-data-grid-pro/src/tests/statePersistence.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/statePersistence.DataGridPro.test.tsx @@ -224,13 +224,13 @@ describe(' - State persistence', () => { it('should export the current version of the exportable state', () => { render(); act(() => { - apiRef.current?.setPaginationModel({ page: 1, pageSize: 2 }); apiRef.current?.setPinnedColumns({ left: ['id'] }); apiRef.current?.showPreferences(GridPreferencePanelsValue.filters); apiRef.current?.setSortModel([{ field: 'id', sort: 'desc' }]); apiRef.current?.setFilterModel({ items: [{ field: 'id', operator: '>=', value: '0' }], }); + apiRef.current?.setPaginationModel({ page: 1, pageSize: 2 }); apiRef.current?.setColumnIndex('category', 1); apiRef.current?.setColumnWidth('category', 75); apiRef.current?.setColumnVisibilityModel({ idBis: false });