The Cashbook UI for the Money to Prisoners Project
To run this project locally you need to have Docker and Docker Compose installed.
Alongside this repository you'll need the API server and if you're planning to deploy then you'll need the deployment repository (private repository).
In a terminal cd
into the directory you checked this project out into, then:
$ make test
To run a specific test, or set of tests, run:
$ make test TEST=[testname]
Feature tests are run using a combination of Cucumber.js and WebdriverIO.
Feature files are in test/features/
and step definitions live in test/features/steps/
.
The WebdriverIO testrunner
is used to run the tests using a standalone selenium server.
Config for the testrunner lives in test/
.
To run the tests against all currently selected browsers (Chrome, Firefox, PhantomJS), run:
$ npm test
To run the tests headlessly, run:
$ npm run test-headless
You can also tag scenarios with @wip
and run the following command to only run those scenarios:
$ npm run test-wip
In a terminal cd
into the directory you checked this project out into, then:
$ make lint
To check for a specific class of style violation, run:
$ make lint LINT_OPTS="--select [lint-rules]"
To lint javascript files using JSHint, run:
$ gulp lint
In a terminal cd
into the directory you checked this project out into, then
$ make run
Wait while Docker does it's stuff and you'll soon see something like:
djangogulpserve_1 | [BS] Now you can access your site through the following addresses:
djangogulpserve_1 | [BS] Local URL: http://localhost:3000
You should be able to point your browser at
http://localhost:3000 if you're using
boot2docker then it'll be at the IP of the boot2docker virtual
machine. You can find it by typing boot2docker ip
in a terminal. Then
visit http://boot2docker ip:3000/
Make sure you have a version of the API server running on port 8000.
You should be able to log into the cash book app using following credentials:
- test_prison_1 / test_prison_1 for Prison 1
- test_prison_2 / test_prison_2 for Prison 2