The frontend for Tier 2 of the Community Accommodation Service (CAS-2).
- Docker
- NodeJs
When running the application for the first time, run the following command:
script/setup
This will create .env files and install dependencies.
To run the application there are two options.
In order to spin up a full stack of a working API and other dependant services we recommend using the AP Tools.
NB. The approach AP Tools takes solves a critical limitation for working in development. Due to how the frontend and API authenticate requests they both require access to the same instance of hmpps-auth. This project is the focus of our development tooling across all CAS services and is most likely to receive future updates.
After following the set up the common commands are:
ap-tools server start --local-ui --local-api
(remove the local-ui
or local-api
flags as needed)
The service should then be available at http://localhost:3000
To stop run
ap-tools server stop
Log in credentials are documented within AP tools.
TBD
npm run lint
npm run test
Tun tests in headless mode with:
npm run test:integration
Or run tests with the cypress UI:
npm run test:integration:ui
Install Playwright
npm install
npx playwright install
When using the Playwright UI for the first time you will need to filter by projects by enabling them in the top right.
Test against local environments with and without UI:
npm run test:e2e:local:ui
# or
npm run test:e2e:local
Test against the real dev environments with and without UI:
npm run test:e2e:ui
# or
npm run test:e2e
Set the environment variable IN_MAINTENANCE_MODE
to true in the helm values of
the intended environment and all traffic will be redirected to a static page.
Users with the CAS2_ADMIN
role are an exception to this for testing purposes.
This application is hosted on the MoJ Cloud Platform. For further details head over to our infrastructure documentation.