try a then

This commit is contained in:
Matt Charlton 2019-11-27 12:06:32 +00:00
parent f54c7ffa58
commit 3a279519bd

View File

@ -2,14 +2,21 @@ const PercyScript = require('@percy/script')
PercyScript.run(async (page, percySnapshot) => {
await page.goto('http://localhost:8000')
await page.waitFor('#categories')
await page.evaluate (() => {
let categories = Array.from(document.querySelectorAll('#categories a'))
await page.waitFor('#categories').then(x => {
console.log(x)
const categories = Array.from(document.querySelectorAll('#categories a'))
console.log(categories)
console.log('test')
})
//
// await page.evaluate (() => {
// let categories = Array.from(document.querySelectorAll('#categories a'))
// console.log(categories)
// console.log('test')
// })
await page.goto('http://localhost:8000/#category/Animations')
await page.waitFor('#animations')
await percySnapshot('Animations')