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

Propose/Implement React client testing framework #2066

Closed
brent-hoover opened this issue Mar 31, 2017 · 5 comments
Closed

Propose/Implement React client testing framework #2066

brent-hoover opened this issue Mar 31, 2017 · 5 comments
Assignees
Labels
epic For issues that exist only to track progress on a list of other issues in one place

Comments

@brent-hoover
Copy link
Collaborator

brent-hoover commented Mar 31, 2017

Since we are doing a full push to convert to React, this seems like a prime time to get some testing in place before we end up with 100+ components without tests. The main thrust of this ticket is not to have every component be tested, but to have something in place where developers can quickly and easily write tests for new components they create (and then we will go back and add tests for existing components).

Steps to complete this ticket

  1. Evaluate current options for React testing that will work from the command line and in CI
  2. Propose a framework/tooling
  3. Create a few example tests for existing components
  4. Have these run in CI
  5. Write a tutorial on how to create tests for components that also includes best practices
@brent-hoover brent-hoover added this to the v1.0.x milestone Mar 31, 2017
@aaronjudd aaronjudd modified the milestones: v1.2.x, v1.0.x Apr 5, 2017
@joykare joykare added in progress and removed ready labels Apr 12, 2017
@joykare
Copy link
Contributor

joykare commented Apr 18, 2017

Looked into Jest-Enzyme testing.

  • Installed jest and enzyme into project on joykare-testing-2066
  • Testing order summary component on same branch (test-run)

@joykare
Copy link
Contributor

joykare commented Apr 25, 2017

Pivoted, @zenweasel advised to do example tests on components first.

  • Using selenium-webdriver for headless browser to run tests on.
  • Currently working out integration with CI and reaction CLI

@aaronjudd aaronjudd modified the milestones: v1.2.x, React UI Components Apr 25, 2017
@ghost ghost added review and removed in progress labels Apr 26, 2017
@joykare
Copy link
Contributor

joykare commented Apr 26, 2017

I have some babel presets installed for tests to run but when I configure them in the .babelrc file reaction command fails.

@aaronjudd aaronjudd added epic For issues that exist only to track progress on a list of other issues in one place and removed core labels Apr 27, 2017
@joykare
Copy link
Contributor

joykare commented May 2, 2017

Blockers encountered
With the babel presets if you run reaction the app crashes:

  • Babel presets were linked to .tgz files on package.json so I changed that and linked them to npm. (Still didnt resolve the issue)

Testing
To run unit tests that exist:

  • meteor npm install
  • Install jest globally on your machine
  • Run command jest

@brent-hoover
Copy link
Collaborator Author

Closed via #2170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic For issues that exist only to track progress on a list of other issues in one place
Projects
None yet
Development

No branches or pull requests

3 participants