add basic percy capture script

This commit is contained in:
Matt Charlton 2019-11-15 11:16:10 +00:00
parent 794822a1d1
commit 1a95c1f16e

8
script/percy-tests.js Normal file
View File

@ -0,0 +1,8 @@
const PercyScript = require('@percy/script')
PercyScript.run(async (page, percySnapshot) => {
await page.goto('http://localhost:8000/');
// ensure the page has loaded before capturing a snapshot
await page.waitFor('#Nri-Ui-TextInput-Writing-onBlur-demonstration!');
await percySnapshot('homepage');
})