|
|
@ -1,17 +1,5 @@ |
|
|
|
export const tests = [] |
|
|
|
export const tests = [] |
|
|
|
|
|
|
|
|
|
|
|
tests.push(async ({ eq, page }) => { |
|
|
|
|
|
|
|
// check the JS script has been linked
|
|
|
|
|
|
|
|
await eq.$('script', { type: 'module' }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check the JS script has a valid src
|
|
|
|
|
|
|
|
const source = await page.$eval( |
|
|
|
|
|
|
|
'script', |
|
|
|
|
|
|
|
(node) => node.src.includes('.js') && node.src, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
if (!source.length) throw Error('missing script src') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests.push(async ({ eq, page }) => { |
|
|
|
tests.push(async ({ eq, page }) => { |
|
|
|
// check the class 'eye-closed' has been added in the CSS
|
|
|
|
// check the class 'eye-closed' has been added in the CSS
|
|
|
|
eq.css('.eye-closed', { |
|
|
|
eq.css('.eye-closed', { |
|
|
|