Skip to content
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

Merged
merged 1 commit into from
Apr 6, 2016

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Apr 6, 2016

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:

npm run test-client

/cc @gziolo

@aduth aduth added Framework [Feature] Post/Page Editor The editor for editing posts and pages. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Apr 6, 2016
let EditorGroundControl;

useMockery();
useFakeDom();
this.timeout( 10 * 1000 );
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

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:

screen shot 2016-04-07 at 07 49 24

Also Artifacts tab is very interesting:
screen shot 2016-04-07 at 07 52 08

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.

@blowery
Copy link
Contributor

blowery commented Apr 6, 2016

other than two minor things, looks good. 🚢

@blowery blowery added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Apr 6, 2016
@aduth aduth force-pushed the update/editor-component-tests-single-runner branch from 9edb792 to 667871a Compare April 6, 2016 22:23
@aduth aduth merged commit e1d3d3c into master Apr 6, 2016
@aduth aduth deleted the update/editor-component-tests-single-runner branch April 6, 2016 22:31
@gziolo gziolo added this to the Framework: Single test runner milestone Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. Framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants