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

fix: wip web tests

parent e837b1c1
No related branches found
No related tags found
No related merge requests found
...@@ -47,11 +47,21 @@ if (!config.browser) { ...@@ -47,11 +47,21 @@ if (!config.browser) {
const title = await page.title(); const title = await page.title();
console.log('Page title:', title); console.log('Page title:', title);
page.on('console', async e => {
const args = await Promise.all(e.args().map(a => a.jsonValue()));
console[e.type() === 'warning' ? 'warn' : e.type()](...args);
});
console.log('Running tests...'); console.log('Running tests...');
await page.waitForFunction('document.getElementById("mocha-done").textContent.length > 0', await page.waitForFunction('document.getElementById("mocha-done").textContent.length > 0',
{ timeout: 10000000 } {
timeout: 1000000,
polling: 1000
}
) ; ) ;
const passes = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.passes').textContent); const passes = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.passes').textContent);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment