Repository: content-modelling-e2e
A detailed suite of E2E tests for Content Modelling
README
A suite of end-to-end tests for Content Modelling using Playwright.
These are separate and distinct from the tests in govuk-e2e-tests,
which are light touch smoke tests, designed to be used in production and non-production environments.
These tests test the full workflow, and create and publish content blocks and documents, and as such, should
not be used in Production.
Running the tests locally
Setup
Clone and navigate to the root folder.
Install the dependencies:
npm install
npx playwright install --with-deps chromium
Set environment variables
Create a .env file in the root of the project with the following content:
cat <<EOF > .env
PUBLISHING_DOMAIN=staging.publishing.service.gov.uk
PUBLIC_DOMAIN=www.staging.publishing.service.gov.uk
BASIC_AUTH_USERNAME=<username>
BASIC_AUTH_PASSWORD=<password>
SIGNON_EMAIL=<email>
SIGNON_PASSWORD=<password>
EOF
Replace placeholders with appropriate values.
Run
npm run test
Running in Github Actions
At the moment, the tests are only run on demand - to run them, go to the Playwright action
and click “Run workflow”.