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

[Menu] Isolate more integration tests #17490

Merged
merged 4 commits into from Sep 20, 2019

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Sep 19, 2019

Cherry-picking from #17394 before I'm confident in fixing #16644

This removes commit counting. This is a concern for benchmarks. I have some ideas how we can integrate this smoothly into the test suite but this requires additional work (mostly isolation and if it's possible then only for testing-library tests)

@eps1lon eps1lon added test package: material-ui Specific to @mui/material labels Sep 19, 2019

expect(getAllByRole('menuitem')[0]).to.have.property('tabIndex', 0);
expect(getAllByRole('menuitem')[1]).to.have.property('tabIndex', -1);
expect(getAllByRole('menuitem')[2]).to.have.property('tabIndex', -1);
Copy link
Member Author

Choose a reason for hiding this comment

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

I have some "managed-focus" matcher in mind but want to collect more use cases before abstracting it away.

@mui-pr-bot
Copy link

mui-pr-bot commented Sep 19, 2019

No bundle size changes comparing e48aeba...16cfeaa

Generated by 🚫 dangerJS against 16cfeaa

@eps1lon

This comment has been minimized.

@eps1lon eps1lon changed the title [MenuList] Isolate integration tests [Menu] Isolate more integration tests Sep 19, 2019
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';

function NestedMenu(props) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Candidate for improvement. It includes no nested menu as I understand them. There are two sibling menus which is not nesting IMO. Also nitpicking on the fact that the "second-menu" is the first in the tree 😄

We probably want to replace this with a test for a cascading menu when we work on #11723

@eps1lon eps1lon merged commit 609abb4 into mui:master Sep 20, 2019
@eps1lon eps1lon deleted the test/menulist-isolation branch September 20, 2019 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: material-ui Specific to @mui/material test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants