With mock APIs
yarn && yarn uidev
yarn && yarn start
yarn && yarn build ls build
The package.json file has the field "network" (testnet or mainnet), which we need in order to get the last block height. This way it is possible to determine when a vote has finished or not.
This code has currently unit tests for the core logic. Currently covering lib files (
/src/lib/*) and actions files (
Relevant libraries/modules used for testing are:
- fetch-mock - Mock http requests
- redux-mock-store and redux-actions-assertions for testing redux actions.
There is more testing to be done, you can check it on this opened issue: https://github.com/decred/politeiagui/issues/376
politeia can be hosted in a docker container. To build the site and the docker container:
The container can then be run with
$ docker run -d --rm -p <local port>:80 decred/politeiagui-serve:latest