Skip to content

Marvell-Consulting/statswales-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StatsWales Frontend Service

This service is currently in beta and under active development some features maybe incomplete, not working or missing.

Requirements

  • Node 20+
  • An Instance of the StatsWales backend Service

Windows

  • Git Bash

Configuration

Copy the .env-example file to .env and provide the missing values.

Running the service

To start the app in development mode:

npm install
npm run dev

The service should now be available on port 3000.

Windows

On occasion the Redis Client times outs if this happens restart the frontend service and try again. We are investigating this issue.

Testing the service

There are a number of unit and functional tests under the /tests directory which are executed using jest with no external dependencies. These can be run with the following command:

npm run test

There is also a suite of end-to-end tests under the /tests-e2e directory that are executed via the browser using playwright. They will require an instance of both the frontend and the backend to be running as they interact with the full stack.

Start the backend

cd /path/to/backend
npm run dev

In a separate terminal, start the frontend

cd /path/to/frontend
npm run dev

Finally, run the tests in headless mode

cd /path/to/frontend
npm run test:e2e

...or start the playwright UI for interactive mode

cd /path/to/frontend
npm run test:e2e -- --ui

About

Frontend Service for StatsWales Service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages