A suite of end to end tests for the Approved Premises project using Playwright.
We strongly recommend using the VS Code Playwright plugin and use the plugin's commands.
- Node.JS
- NPM
Install the dependencies with:
npm install
npm run install-playwright
Add a .env
file to the root of the project with the following variables:
HMPPS_AUTH_USERNAME= # A valid HMPPS Auth Username
HMPPS_AUTH_PASSWORD= # A valid HMPPS Auth Password
To run the tests locally against the MoJ Cloud Platform Development environment, run the following command:
npm run test
or;
npm run test:ui
To run using the Playwright user interface
Assuming you have the UI, API and all other required systems running using the ap-tools project, you can run the tests against your local environment with the following command:
npm run test:local
or;
npm run test:local:ui
To run using the Playwright user interface.
Local variables are contained in the local
project in playwright.config.ts.