-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Editor: Update and migrate editor component tests to single runner #4550
Conversation
let EditorGroundControl; | ||
|
||
useMockery(); | ||
useFakeDom(); | ||
this.timeout( 10 * 1000 ); |
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.
can we drop the explicit timeout?
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.
can we drop the explicit timeout?
Not sure why it was added in the first place, but there's not really any performance optimizations made as part of this migration, so I'd be a bit wary about removing it.
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.
can we drop the explicit timeout?
On second thought, I decided to opt for converting the tests to using Enzyme shallow rendering, which should be must faster, and dropped the timeout.
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 converting to Enzyme ;)
Most likely extended timeout time was introduced only to avoid Circle CI failures. @blowery set 10s default timeout for Circle CI env so we no longer need to set it for individual test suites. We can now also easily catch slow tests using Circle CI integration with JUnit output style. See:
Also Artifacts
tab is very interesting:
You can download detailed test output there.
BTW, I have never seen different message than those about token-field component and its execution time is also very stable - 0.7-ish s.
other than two minor things, looks good. 🚢 |
9edb792
to
667871a
Compare
Related: #3942
This pull request seeks to update and migrate post editor component tests to the single test runner.
This includes the following directories:
client/post-editor/editor-discussion
client/post-editor/editor-ground-control
client/post-editor/editor-sharing
client/post-editor/editor-taxonomies
Updates also include minor refactoring to avoid excessive verbosity of warnings for (a) rendering to document body (replaced with
enzyme
shallow rendering) and (b) "double callback" (replacing data components with automated fetching behavior).Testing instructions:
Ensure Mocha tests pass:
/cc @gziolo