Skip to content

ministryofjustice/hmpps-accredited-programmes-e2e

Repository files navigation

Accredited Programmes End to End tests

A suite of end to end tests for the Accredited Programmes project using Playwright.

Getting started

Prerequisites

  • Node.JS
  • NPM

Setup

Install the dependencies with:

npm install

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

Running the tests

To run the tests locally, run the following command:

npx playwright test

You can also run the tests and watch in a browser with:

npx playwright test --ui

Running these tests on CI

The E2E test suite is currently run on the Accredited Programmes UI repository as part of CI.

The user is currently set to use an email address of one of the team members. This is something we should address as soon as possible, and replace with a shared service account. When running the Playwright Tests workflow in the E2E repo, the username and password are read from GitHub Actions secrets in this repository. When running the end_to_end job on CI in the Accredited Programmes UI repository, they're read from the CircleCI (our current CI tool) project settings.

Because HMPPS Auth requires users' passwords to be reset after a certain period of time, we have to update these from time to time. This is done by updating the GitHub Actions secret in this repo, as well as in the UI's Circle CI project settings when running on CI in the UI repo.

About

End to End Tests for the Accredited Programmes project

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published