Skip to content
Snippets Groups Projects
Verified Commit b595850e authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: work on webtests

parent ef8c2c4b
No related branches found
No related tags found
No related merge requests found
......@@ -76,9 +76,9 @@ if (!config.browser) {
}
) ;
const passes = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.passes').textContent);
const failures = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.failures').textContent);
const duration = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.duration').textContent);
const passes = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.passes em').textContent);
const failures = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.failures em').textContent);
const duration = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.duration em').textContent);
const error = await page.evaluate(() => document.getElementById('mocha-errors').textContent);
......@@ -97,6 +97,13 @@ if (!config.browser) {
const failuresAsInt = parseInt(failures);
if (error.length > 0 || failuresAsInt > 0) {
console.error('Tests failed: ', error);
await page.evaluate(() => {
document.querySelectorAll('.test.fail').forEach((node) => {
console.log(node.textContent);
});
});
process.exit(1);
} else {
console.log('Tests passed');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment