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] Convert Drawer tests to testing-library #26837

Merged
merged 1 commit into from
Jun 20, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jun 19, 2021

Part of #22911

@eps1lon eps1lon added test component: drawer This is the name of the generic UI component, not the React module! labels Jun 19, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Jun 19, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against fa3f17e

expect(wrapper.find(Modal).exists()).to.equal(true);
});

it('should render Slide > Paper inside the Modal', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

duplicate test

it("should override Modal's BackdropTransitionDuration from prop when specified", () => {
const testDuration = 335;
const wrapper = mount(
<Drawer BackdropTransitionDuration={testDuration}>
Copy link
Member Author

Choose a reason for hiding this comment

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

BackdropTransitionDuration is no longer implemented. I can check when it got removed.

expect(root).to.have.tagName('div');
expect(root).to.have.class(classes.docked);
});

it('should render div > Paper inside the div', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved the core assertion to "hould render a div instead of a Modal when permanent"

@eps1lon eps1lon marked this pull request as ready for review June 19, 2021 08:11
@eps1lon eps1lon merged commit fd5e2eb into mui:next Jun 20, 2021
@eps1lon eps1lon deleted the test/enzyme-drawer branch June 20, 2021 16:28
@siriwatknp siriwatknp mentioned this pull request Jun 23, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: drawer 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.

2 participants