This repository contains Wraith configuration for SXA Reference site.
It also contains the most recent patterns for the whole site.
Wraith is a screenshot comparison tool, created by developers at BBC News.
Wraith uses a headless browser to create screenshots of webpages on different environments (or at different moments in time) and then creates a diff of the two images; the affected areas are highlighted in red
.
- Clone repository
- Download and install docker
- Run docker
- Set shared drives in docker 1
- If necessary update IP address of your host (default
http://10.0.75.1
) - Make sure that application has set
*
binding - run
.\ps\build.ps1 build
.\ps\build.ps1 task
Available tasks:
latest
- collects current results and compares with existing pattershistory
- creates patternsboth
- execute both commands (history
,latest
) 2
When latest
screenshots should became new patterns
you have to accept them.
To do it easier, you can use PowerShell script for that.
.\ps\accept.ps1 [[-pages] <String[]>] [<CommonParameters>]
.\ps\accept.ps1 renderings_taxonomy_tag-cloud,renderings_stickynotes_stickynote
1. Disk where you checkout this repository
2. Useful when we want to check whether results are correct in two succeeding tests. If not it means that in the future we will get many false positives.
To remove unused containers run
docker container ls -a -f ancestor=bbcnews/wraith | select -Skip 1 |% { $_.Substring(0,11) } | % { docker container rm $_ }