Repository navigation
fix: update ErrorDialog logic and tests - #10111
Merged
Merged
Conversation
buenos-nachos
commented
Oct 6, 2023
| // 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)); |
Contributor
Author
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
Maybe the first reasonable use case for act I've seen in my career :)
buenos-nachos
requested review from
a team and
Kira-Pilot
and removed request for
a team
October 6, 2023 20:45
Kira-Pilot
approved these changes
Oct 6, 2023
Kira-Pilot
left a comment
Contributor
There was a problem hiding this comment.
Thanks for working on this - I bet that test was a pita
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ErrorDialogso that it no longer spits out cryptic messages about unexpected state changesErrorDialogso that the textbox doesn't start nagging you until the textbox loses focusScreen.Recording.2023-10-06.at.4.41.05.PM.mov