-
Notifications
You must be signed in to change notification settings - Fork 92
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
Feature/testing #3360
Merged
Merged
Feature/testing #3360
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39bda05
to
ac3f8c2
Compare
549a44b
to
97254d5
Compare
97254d5
to
c238355
Compare
9caf24f
to
56c5622
Compare
pjosh
approved these changes
Apr 18, 2018
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.
Pretty awesome! 👏 👏
Only one question! We should include /cypress/screenshots
& /cypress/videos
inside the .gitignore
?
1295161
to
3df8195
Compare
Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Time to add some testing to GFW. This PR aims to introduce a new testing platform for end-to-end testing alongside tidying up a lot of the old testing code. We have decided to go with Cypress as a testing library (https://www.cypress.io/). We have 2 testing flows:
RSpec - these are simple route tests with some slightly more complicated ones for the map and download section.
Cypress integration tests - currently only testing the landing page route for rendering.
Local Testing
You can perform local testing in a variety of ways:
npm run test
- will run the full sets of tests forrspec
andcypress
. These will run in the terminal and with any errors/feedback there.npm run test:open
- will open the cypress testing panel. You can then run the tests you want locally and is very powerful for helping you to debug and write new testsbundle exec rspec
- run all rails tests.CI Testing
We are using TravisCI integrated with github to handle the CI testing pipeline.
npm run ci
is the script used to trigger all testing scripts. This means that the package.json has been updated to handle the build, server start, and script running through travis. The old Rails tests (all were failing) have been updated and the cypress tests have been included: