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] Migrate CssBaseline to react-testing-library #22920

Conversation

eladmotola
Copy link
Contributor

@eladmotola eladmotola commented Oct 6, 2020

#22911

@mui-pr-bot
Copy link

mui-pr-bot commented Oct 6, 2020

No bundle size changes comparing cb6b69b...1007f2f

Generated by 🚫 dangerJS against 1007f2f

@eladmotola
Copy link
Contributor Author

I'm trying to figure out what is the connection between this component and <SwipeableDrawer />
The error that I have is

<SwipeableDrawer /> swipe to open anchor=right should slide in a bit when touching near the edge FAILED
	AssertionError: expected null to not equal null
	    at Context.<anonymous> (webpack:///packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.test.js:324:29

I will appreciate any guideness here.
Maybe its because I deleted the 'strict: false'?

@oliviertassinari
Copy link
Member

@eladmotola let us know if you can find the origin of the issue :). Otherwise, I think that we can close and solve it at a future point in time, where the enzyme test is becoming a blocker for an improvement we want to ship.

@eladmotola
Copy link
Contributor Author

@oliviertassinari My hunch was right and it was indeed the "strict:false" here.... so its ready to be merged :)

@oliviertassinari
Copy link
Member

Oh nice, @eps1lon is going to like this one. We have already seen something similar in the past: #18018. I would suspect that in strict mode, the cleanup isn't behaving as expected, we are left with a side effect in the page, which breaks, later on, the swipeable drawer test. I think that we can merge 👌

@eps1lon
Copy link
Member

eps1lon commented Oct 7, 2020

I would suspect that in strict mode, the cleanup isn't behaving as expected, we are left with a side effect in the page, which breaks, later on, the swipeable drawer test. I think that we can merge ok_hand

Yep, it's described above: https://github.com/mui-org/material-ui/blob/60d99a39836fb82f4da1477a717f642c216fb0b9/packages/material-ui/src/CssBaseline/CssBaseline.test.js#L7-L8

@eps1lon eps1lon merged commit 1318789 into mui:next Oct 7, 2020
@eladmotola eladmotola deleted the refactor/migrate-cssbaseline-react-testing-library branch October 7, 2020 13:19
@oliviertassinari oliviertassinari added the component: CssBaseline The React component label Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants