Cypress + reg-cli によるビジュアルリグレッションテストのスクリプト。
cypress/fixtures/visual-regression-test/config.json.sample
をコピーし、cypress/fixtures/visual-regression-test/config.json
とするconfig.json
を変更するcommons.url.ref
とcommons.url.test
を見本サイトのURLとテストしたいサイトのURLにする- 末尾
/
不要
- 末尾
- 非表示にしたい要素のセレクタ文字列を
commons.hideElements
に追加・削除する viewports
を設定するpages
でサイト内のテストしたいページを指定するuri
: 先頭/
始まりtest_id
: ファイル名になるため重複しないようにすること
yarn
(初回のみ)- 多少時間がかかる (環境にも依存するが、例えば10分程度とか)
yarn test