-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[core] Add tests for column selector #845
[core] Add tests for column selector #845
Conversation
…e/DataGrid-345-add-tests-column-selector
expect(getColumnHeaders()).to.deep.equal(['id', 'brand']); | ||
|
||
fireEvent.click(getByText('Columns')); | ||
fireEvent.click(document.querySelectorAll('[role="tooltip"] [name="id"]')[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A related not. Is it expected to have a role tooltip on the Popper we display? We don't have any documentation about the accessibility on the component's page https://next.material-ui.com/components/popper/. I wonder if it would make sense to add one cc @eps1lon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanailH Why are we using querySelectorAll over querySelector if we only query one element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanailH Why are we using querySelectorAll over querySelector if we only query one element?
That's my bad, I must have been testing different things and forgot about that, I'll fix it.
Regarding the Popper missing a role -> that would have been my prefered method of selecting it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One would have to look into whether this makes sense. For example, https://next.material-ui.com/components/popper/#scroll-playground probably is not a tooltip. It would be confusing to have a Popper and Tooltip when both have role="tooltip"
Regarding the requirements for closing #345. I wonder, should we mention |
@oliviertassinari , yes I think we should mention it. I'll add it as part of this PR. Regarding whether we should call it |
Sorry, I shouldn't have used the name of the prop to explain what I was wondering. The name of the boolean are meant to always have |
No, I understood the question, maybe I didn't really explain my point the correct way - I don't think it matters much now, we are about to rework the way the toolbar works. That is one side of the problem. When we do that means that basically, everything in the toolbar will be opt-in so it makes sense to have the booleans that are related to matching toolbar features as |
Sounds great |
@dtassone can I merge this? |
Fixes #345
Part 2 of "Implement Column selector" - tests