diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79e763a4e58ae6445f89ce0bec32d813afe493df..ec41059853a0bb664e20e1a2eacf799d03f90b8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,8 +46,14 @@ web-tests: - pnpm-lock.yaml paths: - node_modules/ - -#deploy: + artifacts: + paths: + - screenshot.png + + + + + #deploy: # stage: deploy # tags: # - nixos-gen3 diff --git a/test/web/puppeteer.mjs b/test/web/puppeteer.mjs index 85108a2768326dfb5049ca2acbca5f7ae20adc2c..3a97701227cf828e93e73402ef53d47c187e4c83 100644 --- a/test/web/puppeteer.mjs +++ b/test/web/puppeteer.mjs @@ -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