Apply for and manage temporary accommodation
- Docker
- NodeJS
When running the application for the first time, run the generate-dotenv-files.sh script by executing this command from root in a Terminal:
./script/generate-dotenv-files.sh
Running the above script will generate two .env
files required by the application:
- .env - this is blank initially but is required for the application to deploy as we use
dotenv
as annpm
lib in this repo. This blank file will also enable you to override properties set in the.env.cas3-ui
file inAP tools
where we deploy the application (see theRunning the application
section below for more details on this) - e2e.env - this is used to load properties for the
Playwright
e2e suite (see theE2E tests
section below for more details on this)
In order to spin up a full local stack with the API (integrating with dependent services) use AP Tools.
NB. This project is the focus of our development tooling across all CAS services and is likely to receive future updates.
After following the setup the common commands are:
- When running the API as a docker container and deploying everything (inc. this UI):
ap-tools server start --cas3 --local-ui
- When running the API locally and deploying everything (inc. this UI):
ap-tools server start --cas3 --local-ui --local-api
The service should then be available at http://localhost:3000
The same credentials used to login to the dev instance of the CAS3 UI should be used. For more information, see the Dev & Test Users documentation
For a quick glance at the user logins see the e2e.env file (see the E2E tests
section below for more details on this file)
- To stop the deployment:
ap-tools server stop
The generate-dotenv-files.sh script run in the Setup
section earlier generated a e2e.env by:
- copying from the e2e.env.template file
- swapping out the parameterized values in the template for real
Kubenetes
secrets for you. For more information, see the Dev & Test Users documentation - this e2e.env loads all of the property values required by the
Cypress
e2e suite
First start the ap-tools using
ap-tools server stop --clear-databases
ap-tools server start --cas3 --local-ui --local-api
The generate-dotenv-files.sh script run in the Setup
section earlier generated a e2e.env by:
- copying from the e2e_playwright.env.template file
- swapping out the parameterized values in the template for real
Kubenetes
secrets for you. For more information, see the Dev & Test Users documentation - this e2e.env loads all of the property values required by the
Playwright
e2e suite
- Install Playwright:
npm install
npx playwright install
Then start the tests using one of the following:
npm run test:playwright:e2e
npm run test:playwright:e2e:ui
First start the ap-tools using
ap-tools server stop --clear-databases
ap-tools server start --cas3 --local-ui --local-api
If you also want to test emails, review the 'Testing Emails' section below
Then start the tests using one of the following:
npm run test:playwright:e2e:local
npm run test:playwright:e2e:local:ui
Our release process aligns with the other CAS teams and as such lives in Confluence. The steps are also available in the PULL_REQUEST_TEMPLATE.
This application is hosted on the MoJ Cloud Platform. For further details head over to our infrastructure documentation.
Details of the different environments and their roles can be found in Confluence.