alan-null / XA.Reference.Wraith

Wraith configuration for XA.Reference site.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XA.Reference.Wraith

This repository contains Wraith configuration for SXA Reference site.

It also contains the most recent patterns for the whole site.

Wraith

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.

Usage

  • 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

Build commands

Usage

.\ps\build.ps1 task

Available tasks:

  • latest - collects current results and compares with existing patters
  • history - creates patterns
  • both - execute both commands (history,latest) 2

Accepting new patterns

When latest screenshots should became new patterns you have to accept them.

new patterns

To do it easier, you can use PowerShell script for that.

Usage

.\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.

Cleanup

To remove unused containers run

docker container ls -a -f ancestor=bbcnews/wraith | select -Skip 1 |% { $_.Substring(0,11) } | % { docker container rm $_ }

About

Wraith configuration for XA.Reference site.


Languages

Language:PowerShell 73.9%Language:JavaScript 26.1%