Skip to content

Commit 1a53041

Browse files
committed
added paginationMode server to tests with rowCount prop
1 parent 9aa89ae commit 1a53041

4 files changed

+9
-3
lines changed

packages/x-data-grid-pro/src/tests/events.DataGridPro.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ describe('<DataGridPro /> - Events params', () => {
340340
sortingMode="server"
341341
filterMode="server"
342342
rowsLoadingMode="server"
343+
paginationMode="server"
343344
rowCount={50}
344345
/>,
345346
);

packages/x-data-grid-pro/src/tests/lazyLoader.DataGridPro.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('<DataGridPro /> - Lazy loader', () => {
5151
sortingMode="server"
5252
filterMode="server"
5353
rowsLoadingMode="server"
54+
paginationMode="server"
5455
/>
5556
</div>
5657
);

packages/x-data-grid-pro/src/tests/rows.DataGridPro.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ describe('<DataGridPro /> - Rows', () => {
960960
const { rows, columns } = getBasicGridData(10, 2);
961961
const rowCount = rows.length;
962962
render(
963-
<TestCase rows={rows} columns={columns} rowCount={rowCount} paginationMode={'server'} />,
963+
<TestCase rows={rows} columns={columns} rowCount={rowCount} paginationMode="server" />,
964964
);
965965

966966
const rowCountElement = document.querySelector<HTMLElement>(`.${gridClasses.rowCount}`);
@@ -971,7 +971,7 @@ describe('<DataGridPro /> - Rows', () => {
971971
const { rows, columns } = getBasicGridData(10, 2);
972972
const rowCount = rows.length + 10;
973973
render(
974-
<TestCase rows={rows} columns={columns} rowCount={rowCount} paginationMode={'server'} />,
974+
<TestCase rows={rows} columns={columns} rowCount={rowCount} paginationMode="server" />,
975975
);
976976

977977
const rowCountElement = document.querySelector<HTMLElement>(`.${gridClasses.rowCount}`);
@@ -982,7 +982,7 @@ describe('<DataGridPro /> - Rows', () => {
982982
const { rows, columns } = getBasicGridData(10, 2);
983983
let rowCount = rows.length;
984984
const { setProps } = render(
985-
<TestCase rows={rows} columns={columns} rowCount={rowCount} paginationMode={'server'} />,
985+
<TestCase rows={rows} columns={columns} rowCount={rowCount} paginationMode="server" />,
986986
);
987987
rowCount += 1;
988988
setProps({ rowCount });

packages/x-data-grid-pro/src/tests/statePersistence.DataGridPro.test.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ describe('<DataGridPro /> - State persistence', () => {
162162
page: FULL_INITIAL_STATE.pagination?.paginationModel?.page!,
163163
pageSize: FULL_INITIAL_STATE.pagination?.paginationModel?.pageSize!,
164164
}}
165+
paginationMode="server"
166+
rowCount={FULL_INITIAL_STATE.pagination?.rowCount}
165167
pinnedColumns={FULL_INITIAL_STATE.pinnedColumns}
166168
// Some portable states don't have a controllable model
167169
initialState={{
@@ -186,6 +188,8 @@ describe('<DataGridPro /> - State persistence', () => {
186188
page: FULL_INITIAL_STATE.pagination?.paginationModel?.page!,
187189
pageSize: FULL_INITIAL_STATE.pagination?.paginationModel?.pageSize!,
188190
}}
191+
paginationMode="server"
192+
rowCount={FULL_INITIAL_STATE.pagination?.rowCount}
189193
pinnedColumns={FULL_INITIAL_STATE.pinnedColumns}
190194
// Some portable states don't have a controllable model
191195
initialState={{

0 commit comments

Comments
 (0)