suddjian commented on a change in pull request #15399:
URL: https://github.com/apache/superset/pull/15399#discussion_r660804971



##########
File path: 
superset-frontend/spec/javascripts/explore/components/VizTypeControl_spec.jsx
##########
@@ -31,6 +33,9 @@ const defaultProps = {
   isModalOpenInit: true,
 };
 
+const waitForEffects = () =>
+  act(() => new Promise(resolve => setTimeout(resolve, 0)));

Review comment:
       The issue here wasn't that components under test weren't ready. AntD 
and/or the Icon component seems to be doing some kind of async changes, so even 
though the test passes, there is a warning `an update to Icon was not wrapped  
in act()`. This sufficiently `act`-ifies whatever side effects are going on and 
prevents those warnings. I'll add a comment in the code explaining this.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to