-
Notifications
You must be signed in to change notification settings - Fork 886
fix: update ErrorDialog logic and tests #10111
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
Conversation
// DOM aware of the changes | ||
|
||
// eslint-disable-next-line testing-library/no-unnecessary-act -- have to make sure state updates don't slip through cracks | ||
return act(() => userEvent.type(inputElement, text)); |
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.
To be clear, this issue existed with the previous version of the component, too. I just don't know if this is a recent issue or not – the error message is really big and scary looking. Hard to miss, even with the tests still passing.
Going to see if it's worth opening an issue with MUI and/or RTL
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.
Maybe the first reasonable use case for act
I've seen in my career :)
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.
Thanks for working on this - I bet that test was a pita
References #9348. Basically, some prep work for the actual feature. I just figured I'd just get these changes out today.
Had to spend a lot of the day debugging an issue with MUI in React Testing Library. Not sure when it was introduced
Changes
ErrorDialog
so that it no longer spits out cryptic messages about unexpected state changesErrorDialog
so that the textbox doesn't start nagging you until the textbox loses focusScreen.Recording.2023-10-06.at.4.41.05.PM.mov