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

fix: wip web tests

parent 9db06fb7
No related branches found
No related tags found
No related merge requests found
import puppeteer from 'puppeteer'; import puppeteer from 'puppeteer';
import {unlinkSync} from 'fs';
import {existsSync} from 'fs';
// args auswerten mit --path und --browser, get from args // args auswerten mit --path und --browser, get from args
const args = process.argv; const args = process.argv;
...@@ -80,6 +83,11 @@ if (!config.browser) { ...@@ -80,6 +83,11 @@ if (!config.browser) {
console.log('Tests failed:', failures); console.log('Tests failed:', failures);
console.log('Duration:', duration); console.log('Duration:', duration);
// rm -rf screenshot.png (javascript)
if (existsSync('screenshot.png')) {
unlinkSync('screenshot.png');
}
await page.screenshot({ path: 'screenshot.png' }); await page.screenshot({ path: 'screenshot.png' });
await browser.close(); await browser.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment