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.
This commit adds end to end tests with Protractor for the app with a simple login test to get started.
Tests run on a headless instance of Chrome. To do this, I added a Chrome installation to the Vagrantfile.
Since the tests are running within Vagrant, they also access the CouchDB on port 5984 rather than 2200 as they do in the app. I added an Angular environment file for tests which will swap in that port number, so the tests need to be run with the command
npm e2e --environment test
.Currently the tests setup by creating a test user (username is available to tests in the
browser.params.user
variable and password is alwayse2e
) and teardown by deleting that user. As we secure the app with admin users, this will need to change. Not sure what the ideal solution is for this, but having separate test DBs which cannot replicate to our production instances is my first thought.Full commands to run the tests: