-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix test issues discovered while trying to test React 17 #17050
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 64cbeaf:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Potential regressions comparing to master
Perf comparison
Perf tests with no regressions
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: e67afa33850a94a97f97aa7b67dc89c2c15f49c3 (build) |
4dd60ea
to
5e28f09
Compare
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 doing this!
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.
Actually, it seems like some FocusTrapZone
tests are failing so it'd be great if we could have them working as expected again.
This pull request has been automatically marked as stale because it was marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 5 days of this comment. Thank you for your contributions to Fluent UI! |
2cfb310
to
968bd46
Compare
968bd46
to
64cbeaf
Compare
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.
LGTM 🇮🇸
Please resolve conflicts and this can be merged. ✅
Pull request checklist
$ yarn change
Description of changes
While trying to run tests with React 17 (see #16886), I found a few instances where either:
This PR fixes those issues where it makes sense to go ahead and do so. Some common ones:
act
helper, which several tests were.react-dom
, should useact
fromreact-dom/test-utils
act
fromenzyme
unmount()
withact
. Go ahead and add this since it's harmless.To help with attaching to the document, I added a new
attach
parameter to@fluentui/test-utilities
safeMount
. I also added a newsafeRender
utility which wrapsReactDOM.render
with cleanup and anattach
parameter.