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] Add tests for DataGrid filtering feature #715

Merged
merged 19 commits into from
Dec 16, 2020

Conversation

dtassone
Copy link
Member

@dtassone dtassone commented Dec 9, 2020

No description provided.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Nothing works! It works in storybook though

In this case, I would encourage we take it more slowly. We can do the test refactoring and the new test in two different PRs.

test/karma.conf.js Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! test labels Dec 9, 2020
@dtassone
Copy link
Member Author

Still WIP but you can have a quick look.
The testUtils abstraction is not rerendering components changed with ApiRef so using testingLibrary which works as expected.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Please move the refactoring of the tests to a different PR. We are changing tests and source at the same time, we should be able to see what impacts what

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

I have opened #723 to improve the first refactoring, as I have seen the same issues. It looks like I should have been more careful in the initial review, and not surface it. An example of why smaller PRs are always better :).

Then, we can rebase this pull request and improve on top of #723.

packages/grid/x-grid/package.json Outdated Show resolved Hide resolved
packages/grid/x-grid/src/tests/apiRef.XGrid.test.tsx Outdated Show resolved Hide resolved
packages/grid/x-grid/src/tests/apiRef.XGrid.test.tsx Outdated Show resolved Hide resolved
packages/grid/x-grid/src/tests/apiRef.XGrid.test.tsx Outdated Show resolved Hide resolved
packages/grid/x-grid/src/tests/keyboard.XGrid.test.tsx Outdated Show resolved Hide resolved
test/karma.tests.js Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari changed the title [Tests] Testing filters with karma [test] Add tests for DataGrid filtering feature Dec 11, 2020
@dtassone dtassone merged commit 6e87cb3 into mui:master Dec 16, 2020
@oliviertassinari
Copy link
Member

Great, we go from 30 tests (2.5s) to 53 tests (4s). The tests run fast enough. We should be able to add x10 more without having to change anything in the infrastructure. I only hope that it won't get slower as we add more features in the data grid.

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! test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants