mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
4 years ago
|
export const tests = []
|
||
|
|
||
|
tests.push(async ({ page, eq }) => {
|
||
|
// check that the title tag is present & is set with some text
|
||
4 years ago
|
const title = await page.$eval('title', (node) => node.textContent)
|
||
|
if (!title.length) throw Error('missing title')
|
||
4 years ago
|
})
|
||
4 years ago
|
|
||
4 months ago
|
tests.push(async ({ page, eq }) => {
|
||
|
// check that the title tag is set with text from the given list
|
||
|
const title = await page.$eval('title', (node) => node.textContent)
|
||
|
if (title !== 'invisibility' && title !== 'light-speed' && title !== 'super-strength' && title !== 'advanced-healing' && title !== 'mind-link') {
|
||
|
throw Error('wrong title, pick one of the list')
|
||
|
}
|
||
|
// invisibility
|
||
|
// light-speed
|
||
|
// super-strength
|
||
|
// advanced-healing
|
||
|
// mind-link
|
||
|
})
|
||
|
|
||
4 years ago
|
tests.push(async ({ page, eq }) => {
|
||
4 years ago
|
// 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' })
|
||
4 years ago
|
})
|
||
|
|
||
4 years ago
|
tests.push(async ({ page, eq }) => {
|
||
4 months ago
|
// check the lower-body
|
||
4 years ago
|
|
||
|
return eq.$('section:nth-child(3)', { textContent: 'lower-body' })
|
||
|
})
|