This part assumed that you have a working NodeJS environment on Ubuntu. See the build environment document for further instructions.
The tests for Zonemaster GUI are implemented using playwright, to install the tests dependencies run the following.
npm run e2e:install-deps
npm run e2e:install
This will install system dependencies as well as the browsers used to tests the GUI.
To run the tests run the following command.
npm run e2e
If the appearance of the GUI changes some tests might fail as the baseline for visual comparison is no longer up to date. In this case it is required to update the snapshots. The following commands updates the snapshots while ensuring a similar environment than the one the CI runs in is used (ubuntu focal and UTC time).
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.12.3-focal /bin/bash
npm run e2e:install
npm run e2e:update
exit