Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Cover row grouping regression with a unit test #8870

Merged

Conversation

cherniavskii
Copy link
Member

Covers #8853 that was fixed in #8823

@cherniavskii cherniavskii added test component: data grid This is the name of the generic UI component, not the React module! feature: Row grouping Related to the data grid Row grouping feature labels May 4, 2023
@mui-bot
Copy link

mui-bot commented May 4, 2023

Netlify deploy preview

Netlify deploy preview: https://deploy-preview-8870--material-ui-x.netlify.app/

Updated pages

No updates.

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 698.9 1,414.7 1,414.7 991.68 272.136
Sort 100k rows ms 701.7 1,493 1,476 1,264.72 296.431
Select 100k rows ms 275.6 412.1 393.8 356.26 55.335
Deselect 100k rows ms 238.5 457 293.3 315.62 73.932

Generated by 🚫 dangerJS against 0a2b87f

Copy link
Member

@MBilalShafi MBilalShafi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be tag it [test] in title to be placed correctly in Changelog?

expect(getColumnValues(3)).to.deep.equal(['', 'username1', 'username2']);

// trigger row update without any changes in row data
act(() => apiRef.current.updateRows([{ id: 1 }]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also try an actual data update (lets say username2 => username2 updated)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already is a test that covers an actual update:

https://github.com/mui/mui-x/blob/e78f8c5e76ea74b67faa3485f589dec6d34e142b/packages/grid/x-data-grid-premium/src/tests/rowGrouping.DataGridPremium.test.tsx#L2622C9-L2636

In the regression covered by the test in this PR, the row was reordered even if there were no actual updates to the row - that's why I wrote it this way 🙂

@cherniavskii cherniavskii changed the title [DataGridPremium] Cover row grouping regression with a unit test [test] Cover row grouping regression with a unit test May 11, 2023
@cherniavskii cherniavskii merged commit e3144d6 into mui:master May 11, 2023
@cherniavskii cherniavskii deleted the unit-test-for-row-grouping-updates branch May 11, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Row grouping Related to the data grid Row grouping feature test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants