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

E2E testing enhancements #2408

Merged
merged 7 commits into from Jun 26, 2017

Conversation

Projects
None yet
5 participants
@EnoahNetzach
Copy link
Contributor

commented May 29, 2017

Features to add:

  • local testing with docker

  • bash callback after the docker entrypoint

  • docs explaining how testing is managed and how to contribute

  • test modified files

@ro-savage

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

Is it possible to pass jest errors along to the e2e tests?

I'm not entirely sure what you mean.
jest runs should always log to terminal, isn't it?

I tried to reproduce this and wasn't able to. So just ignore that comment, if I come across it again / can reproduce I'll let you know.

@ro-savage

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

Actually, can confirm that the errors are being passed correctly. The error I saw was only because I had edited the tmp files directly.

Happy to review your readme etc when its ready. Just ping me.

Thanks again for your help debugging the e2e stuff.

@EnoahNetzach EnoahNetzach force-pushed the EnoahNetzach:local-testing branch from 977e8f4 to 45df6bf May 30, 2017

EnoahNetzach added some commits May 31, 2017

@ro-savage
Copy link
Contributor

left a comment

Looks really good!

Just some minor thoughts/tweaks.

Still wonder if its possible to direct people to where the test failed test, development, production or eject when it does fail. Just since people often skip readme's. Although it might have just been a rare edge case (or stupidity) where it wasn't obvious that test was failing rather than development / production.

This is a simple script that runs a **Docker** container, where the node version, git branch to clone, test suite, and whether to run it with `yarn` or `npm` can be chosen.
Simply run `yarn e2e:docker -- --help` to get additional info.

N.B.: this command will clone the local repository in the docker container, so any uncommitted changes are ignored.

This comment has been minimized.

Copy link
@ro-savage

ro-savage Jun 1, 2017

Contributor

Is there a way to run this on uncommitted changes. As normally I'd make changes, write tests, run tests. And then if everything works commit changes.

With this, I'd be making changes, committing, testing, making changes, committing, testing, etc.

This comment has been minimized.

Copy link
@EnoahNetzach

EnoahNetzach Jun 1, 2017

Author Contributor

Yep, coming soon!

## Contributing to E2E (end to end) tests

All information are in the dedicated [README](/packages/react-scripts/fixtures/kitchensink/README.md).

This comment has been minimized.

Copy link
@ro-savage

ro-savage Jun 1, 2017

Contributor

Is it worth putting in a TL:DR?

TL:DR use the command yarn e2e:docker to run unit and e2e tests

@gaearon gaearon merged commit 1f91848 into facebook:master Jun 26, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@gaearon

This comment has been minimized.

Copy link
Member

commented Jun 26, 2017

Thanks for this!

@gaearon gaearon added this to the 1.0.8 milestone Jun 26, 2017

@EnoahNetzach EnoahNetzach deleted the EnoahNetzach:local-testing branch Jun 26, 2017

@gaearon

This comment has been minimized.

Copy link
Member

commented Jun 28, 2017

Can you add info on how to setup Docker for this? At least a link. I can't seem to figure it out.

@EnoahNetzach

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2017

Do you mean how to setup Docker itself on various OSes?

@gaearon

This comment has been minimized.

Copy link
Member

commented Jun 28, 2017

I guess I'll try official instructions (linking to them would be welcome).
I hoped brew install docker would work but I can't get daemon to run.

@EnoahNetzach

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2017

https://docs.docker.com/engine/installation/, I'll link them in the docs in a minute

@EnoahNetzach

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2017

@Timer

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2017

FWIW brew cask install docker is what works. Make sure you open the docker application, as it populates the CLI tool into your PATH.

romaindso added a commit to romaindso/create-react-app that referenced this pull request Jul 10, 2017

E2E testing enhancements (facebook#2408)
* Local testing with docker

* Docs on e2e testing

* `bash` callback after docker

* Add a TL;DR in the CONTRIBUTING section

* Local e2e testing with modified files

* Remove the N.B. from the README

* Fixed a fixme in e2e doc

wmonk referenced this pull request in wmonk/create-react-app-typescript Aug 7, 2017

E2E testing enhancements (#2408)
* Local testing with docker

* Docs on e2e testing

* `bash` callback after docker

* Add a TL;DR in the CONTRIBUTING section

* Local e2e testing with modified files

* Remove the N.B. from the README

* Fixed a fixme in e2e doc

morgs32 added a commit to BrickworkSoftware/create-react-app that referenced this pull request Sep 1, 2017

E2E testing enhancements (facebook#2408)
* Local testing with docker

* Docs on e2e testing

* `bash` callback after docker

* Add a TL;DR in the CONTRIBUTING section

* Local e2e testing with modified files

* Remove the N.B. from the README

* Fixed a fixme in e2e doc

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.