fixing puppeter issue

This commit is contained in:
Gabriel Grubba
2023-09-19 14:22:54 -03:00
parent 8bd8c63d52
commit 97352c0c7a

View File

@@ -24,7 +24,7 @@ async function runNextUrl(browser) {
if (await isDone(page)) {
let failCount = await getFailCount(page);
console.log(`
The number of tests from Test number may be different because
The number of tests from Test number may be different because
of the way the test is written. causing the test to fail or
to run more than once. in the console. Test number total: ${ testNumber }`);
console.log(`Tests complete with ${ failCount } failures`);
@@ -108,11 +108,17 @@ async function getFailed(page) {
}
async function runTests() {
console.log(`Running test with Puppeteer at ${ process.env.URL }`);
console.log(`Running test with Puppeteer at ${process.env.URL}`);
// --no-sandbox and --disable-setuid-sandbox must be disabled for CI compatibility
const browser = await puppeteer.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] });
console.log(`Using version: ${ await browser.version() }`);
const browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-web-security',
],
});
console.log(`Using version: ${await browser.version()}`);
runNextUrl(browser);
}