mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-11 03:28:09 +03:00
go to each url and capture
This commit is contained in:
parent
056a67ba9c
commit
651f96b2fd
@ -5,10 +5,28 @@ PercyScript.run(async (page, percySnapshot) => {
|
||||
// ensure the page has loaded before capturing a snapshot
|
||||
await page.waitFor('.module-example__Nri-Ui-Alert-V4')
|
||||
|
||||
await page.evaluate ((percySnapshot) => {
|
||||
let categories = Array.from(document.querySelectorAll('#categories a'))
|
||||
for (let category of categories)
|
||||
category.click()
|
||||
percySnapshot(category.innerText)
|
||||
})
|
||||
await page.goto('http://localhost:8000/#category/Animations')
|
||||
percySnapshot('Animations')
|
||||
await page.goto('http://localhost:8000/#category/Buttons')
|
||||
percySnapshot('Buttons')
|
||||
await page.goto('http://localhost:8000/#category/Colors')
|
||||
percySnapshot('Colors')
|
||||
await page.goto('http://localhost:8000/#category/Icons')
|
||||
percySnapshot('Icons')
|
||||
await page.goto('http://localhost:8000/#category/Inputs')
|
||||
percySnapshot('Inputs')
|
||||
await page.goto('http://localhost:8000/#category/Layout')
|
||||
percySnapshot('Layout')
|
||||
await page.goto('http://localhost:8000/#category/Modals')
|
||||
percySnapshot('Modals')
|
||||
await page.goto('http://localhost:8000/#category/Pages')
|
||||
percySnapshot('Pages')
|
||||
await page.goto('http://localhost:8000/#category/Tables')
|
||||
percySnapshot('Tables')
|
||||
await page.goto('http://localhost:8000/#category/Text')
|
||||
percySnapshot('Text')
|
||||
await page.goto('http://localhost:8000/#category/Widgets')
|
||||
percySnapshot('Widgets')
|
||||
await page.goto('http://localhost:8000/#category/Messaging')
|
||||
percySnapshot('Messaging')
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user