Skip to content

Commit

Permalink
pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Dec 28, 2024
1 parent 0da9c23 commit 96cf06d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import {
GridColDef,
} from '@mui/x-data-grid-premium';

const isJSDOM = /jsdom/.test(window.navigator.userAgent);

const baselineProps: DataGridPremiumProps = {
autoHeight: isJSDOM,
disableVirtualization: true,
rows: [
{ id: 0, category1: 'Cat A', category2: 'Cat 1' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ describe('<DataGridPro /> - Rows', () => {
});

it('should have all the rows rendered in the DOM when autoPageSize: true', () => {
render(<TestCaseVirtualization />);
render(<TestCaseVirtualization autoHeight />);
expect(getRows()).to.have.length(apiRef.current.state.pagination.paginationModel.pageSize);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ describe('<DataGrid /> - Column spanning', () => {
it('should move down by the amount of rows visible on screen when pressing "PageDown"', () => {
render(
<div style={{ width: 500, height: 300 }}>
<DataGrid {...baselineProps} columns={columns} disableVirtualization={isJSDOM} />
<DataGrid
{...baselineProps}
columns={columns}
autoHeight={isJSDOM}
disableVirtualization={isJSDOM}
/>
</div>,
);

Expand All @@ -192,7 +197,7 @@ describe('<DataGrid /> - Column spanning', () => {
it('should move up by the amount of rows visible on screen when pressing "PageUp"', () => {
render(
<div style={{ width: 500, height: 300 }}>
<DataGrid {...baselineProps} columns={columns} />
<DataGrid {...baselineProps} columns={columns} autoHeight={isJSDOM} />
</div>,
);

Expand Down

0 comments on commit 96cf06d

Please sign in to comment.