Skip to content

UKHomeOffice/lev-web

Repository files navigation

LEV Front End

Build Status Build Status

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

The following tools are needed to install the software

  • Docker / NodeJS / NPM

Local development environment (LDE)

There is a common local development setup that builds, tests, and executes that service within docker. This reduces the risk of issues arising due to differences in developers local setup.

To build a new or reset the LDE:

./bin/build

Once you have the LDE created you can start with:

./bin/start

Access the LDE:

./bin/bash

Once a developer has access to the LDE they should execute all their node / NPM commands within the container:

npm install
npm start & #background
npm stop
npm test
npm run smoke
...

Running the tests

Locally

npm test

Smoke tests against a server

ENV=dev KEYCLOAK_URL=https://sso-dev.notprod.homeoffice.gov.uk TEST_URL=https://dev.notprod.lev.homeoffice.gov.uk/ TEST_USERNAME=xxxx TEST_PASSWORD=xxxx npm run smoke
ENV=uat KEYCLOAK_URL=https://sso.digital.homeoffice.gov.uk TEST_URL=https://uat.notprod.lev.homeoffice.gov.uk/ TEST_USERNAME=xxxx TEST_PASSWORD=xxxx npm run smoke

Acceptance tests against a server

ENV=dev KEYCLOAK_URL=https://sso-dev.notprod.homeoffice.gov.uk TEST_URL=https://dev.notprod.lev.homeoffice.gov.uk/ TEST_USERNAME=xxxx TEST_PASSWORD=xxxx npm run acceptance
ENV=uat KEYCLOAK_URL=https://sso.digital.homeoffice.gov.uk TEST_URL=https://uat.notprod.lev.homeoffice.gov.uk/ TEST_USERNAME=xxxx TEST_PASSWORD=xxxx npm run acceptance

OR

docker build -f ./E2E_test_Dockerfile -t lev-web-e2e-tests .
docker run --rm -e ENV=dev -e TEST_URL=http://lev-web-dev.dsp.notprod.homeoffice.gov.uk -e USERNAME=xxxx -e PASSWORD=xxxx lev-web-e2e-tests

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the GPLv2 License - see the LICENSE.md file for details