Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Testing the front end

Debra Willrett edited this page Mar 16, 2017 · 22 revisions

Running the tests

Unit Tests

Tests are written in Jasmine and run with the Karma test runner.

To avoid Google Analytics errors while running Karma tests the value of analyticsKey in the tracking-service.conf.json file should be the string false.

To run the tests:

npm test

To have karma watch for changes:

$ karma start

End-to-end (e2e) Tests

e2e tests use Protractor. To run them, make sure you are on node version 6. If you need to install it first. Then install dependencies:

$ nvm node 6    (if you need to update it)

$ npm install

$ npm gulp -g

$ npm protractor -g

$ webdriver-manager update

To run the tests:

$ webdriver-manager start

Now open another terminal window. Make sure you gulp first before running e2e the first time.

$ gulp

Then you can run the e2e tests from gulp:

$ gulp e2e
Clone this wiki locally