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

fix: wip web tests

parent ebd015dd
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,12 @@ web-tests:
- pnpm-lock.yaml
paths:
- node_modules/
artifacts:
paths:
- screenshot.png
#deploy:
# stage: deploy
......
......@@ -54,20 +54,18 @@ if (!config.browser) {
const title = await page.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);
});
// 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...');
await page.waitForFunction('document.getElementById("mocha-done").textContent.length > 0',
{
timeout: 1000000,
polling: 1000
}
) ;
......@@ -87,7 +85,7 @@ if (!config.browser) {
console.log('Tests passed');
}
await page.screenshot({ path: 'google.png' });
await page.screenshot({ path: 'screenshot.png' });
await browser.close();
})();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment