refactor(puppeteer): left comments with paths to firefox and chrome binaries for future references

This commit is contained in:
Carlos Jimenez Ruiz 2021-10-14 16:16:49 +02:00
parent 35a2a71602
commit 9644c6b9c1
1 changed files with 9 additions and 3 deletions

View File

@ -5,11 +5,14 @@ import {url as defaultURL} from './config';
export async function getBrowser() { export async function getBrowser() {
const args = [ const args = [
`--no-sandbox`, '--no-sandbox',
`--window-size=${ 1920 },${ 1080 }` `--window-size=${ 1920 },${ 1080 }`,
// '--disable-dev-shm-usage'
// '--full-memory-crash-report',
// '--unlimited-storage'
]; ];
let env = process.env; const env = process.env;
if (env.E2E_DEBUG) { if (env.E2E_DEBUG) {
args.push('--auto-open-devtools-for-tabs'); args.push('--auto-open-devtools-for-tabs');
@ -22,6 +25,9 @@ export async function getBrowser() {
defaultViewport: null, defaultViewport: null,
headless: headless, headless: headless,
slowMo: 0, // slow down by ms slowMo: 0, // slow down by ms
// ignoreDefaultArgs: ['--disable-extensions'],
// executablePath: '/usr/bin/google-chrome-stable',
// executablePath: '/usr/bin/firefox-developer-edition',
}); });
let page = (await browser.pages())[0]; let page = (await browser.pages())[0];