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

Update documentation on testing with Cypress #434

Conversation

crisner
Copy link
Contributor

@crisner crisner commented Mar 3, 2020

Fixes #433 (<=== Add issue number here)

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@jywarren jywarren merged commit c1fcc58 into publiclab:master Mar 3, 2020
@jywarren
Copy link
Member

jywarren commented Mar 3, 2020

Fantastic!!!! 🎉

Copy link
Collaborator

@sagarpreet-chadha sagarpreet-chadha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we can run cypress tests in headless mode, we should add that to documentation as well, because not everyone will want to open separate server for running cypress tests 😄

Comment on lines +102 to +103
6. Run `npm run start` to start a local server.
7. Run `npm run cy:run:chrome` to run e2e and integration tests.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow up, let' combine these 2 commands into one command:
npm run cypress which will be equal to npm run start && npm run cy:run:chrome in package.json. Thanks!
Can be a FTO a well!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I'll create an FTO for this.

@crisner
Copy link
Contributor Author

crisner commented Mar 4, 2020

Also we can run cypress tests in headless mode, we should add that to documentation as well, because not everyone will want to open separate server for running cypress tests 😄

Unfortunately, running Cypress tests in headless mode doesn't seem to work in these tests. Tried initially when I was setting up the tests to run in Travis. I am assuming it is because a child window is used. I had to incorporate the use of a child window as the default window did not like any change in the hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update documentation to include testing in Cypress
3 participants