The Titus testing distribution provides regression testing capabilities for the Titus administration theme. It will install and configure an instance with generated content.
- Docker (17.05.0)
- Docker Compose (1.8.0)
Clone the profile from the document root:
git clone --recursive git@github.com:ellioseven/titus-test.git profiles/titus_test
Install the profile:
./profiles/titus_test/scripts/install.sh
Copy scripts/test/docker-compose.override.example.yml
to
scripts/test/docker-compose.override.yml
and replace the environment values.
cd profiles/titus_test/scripts/test
make build
make test
This will install node dependencies and start running the tests defined in
scripts/test/tests
.
Snapshots are first generated in the scripts/test/snapshots
directory. To
regenerate snapshots, simply remove existing snapshots and re-run the tests.
All tests are defined in scripts/test/tests
. In most cases, they will simply
load a page, take a snapshot (if it doesn't exist already) or compare a snapshot
(if it exists).
You will be able to view diffs in scripts/test/snapshots/__diff_output__
.