public/dom/skeleton_test.js

26 lines
667 B
JavaScript
Raw Normal View History

2021-03-02 17:40:25 +00:00
export const tests = []
tests.push(async ({ page, eq }) => {
// check that the title tag is present & is set with some text
2021-03-02 21:26:57 +00:00
const title = await page.$eval('title', (node) => node.textContent)
if (!title.length) throw Error('missing title')
2021-03-02 20:45:57 +00:00
})
2021-03-02 17:40:25 +00:00
2021-03-02 20:45:57 +00:00
tests.push(async ({ page, eq }) => {
2021-03-02 21:26:57 +00:00
// check the face
return eq.$('section:nth-child(1)', { textContent: 'face' })
})
tests.push(async ({ page, eq }) => {
// check the upper-body
return eq.$('section:nth-child(2)', { textContent: 'upper-body' })
2021-03-02 17:40:25 +00:00
})
2021-03-02 21:26:57 +00:00
tests.push(async ({ page, eq }) => {
// check the lower-body, my favorite part
2021-03-02 21:26:57 +00:00
return eq.$('section:nth-child(3)', { textContent: 'lower-body' })
})