Skip to content

Conversation

@kanzelm3
Copy link
Contributor

@kanzelm3 kanzelm3 commented Aug 4, 2018

Fixes shallow rendering test failures by adding back the defensive branch logic that was removed in #12238, along with a comment this time.

Closes #12247

kanzelm3 and others added 3 commits August 3, 2018 21:04
Removes `disableLifecycleMethods` option from shallow render test to demonstrate the test failures that occur when that option is not set.
Fixes shallow rendering test failures by adding the defensive branch logic back, along with a comment.
@oliviertassinari oliviertassinari added type: new feature Expand the scope of the product to solve a new problem. scope: text field Changes related to the text field. labels Aug 4, 2018
@oliviertassinari
Copy link
Member

It makes me sad to have to merge changes like this. But anyway, let's work around the "broken" shallow method behavior.

@oliviertassinari oliviertassinari merged commit 093c13e into mui:master Aug 4, 2018
@oliviertassinari
Copy link
Member

@kanzelm3 It's a great first pull request on Material-UI 👌🏻. Thank you for giving it a shot!

@kanzelm3
Copy link
Contributor Author

kanzelm3 commented Aug 6, 2018

@oliviertassinari thanks!

@JeremyGrieshop
Copy link

Could this defensive guard fix a similar Jest error I see in Tabs?

TypeError: Cannot read property 'scrollWidth' of null

@oliviertassinari
Copy link
Member

@cobbs-totem Sure, if you want to work on it, I have no objection with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: text field Changes related to the text field. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants