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

Testing the front end

Martin O'Connor edited this page Aug 11, 2016 · 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, first install selenium:

$ npm install
$ ./node_modules/selenium-standalone/bin/selenium-standalone install

Take note of the versions install for the selenium jar and chrome driver. Update tests/env.js with the filename information as shown in tests/env.sample.js.

Then you can run the e2e tests from gulp:

$ gulp e2e

This will start the selenium server, run the tests, then stop the selenium server.

Clone this wiki locally