'use strict'; const path = require('path'); const util = require('util'); const baseUrl = 'http://localhost:4848/'; module.exports = function initConfig() { const config = { baseUrl, artifactsPath: 'test/integration/__artifacts__', capabilities: { browserName: 'chrome', unexpectedAlertBehaviour: 'accept', chromeOptions: { args: [ '--disable-infobars', '--window-size=1024,768', '--window-position=0,0', '--disable-background-networking', '--disable-background-timer-throttling', '--disable-client-side-phishing-detection', '--disable-default-apps', '--disable-extensions', '--disable-hang-monitor', '--disable-popup-blocking', '--disable-prompt-on-repost', '--disable-sync', '--disable-translate', '--metrics-recording-only', '--no-first-run', '--safebrowsing-disable-auto-update', '--enable-automation', '--password-store=basic', '--use-mock-keychain', ], }, }, mochaOpts: { bail: false, }, multiCapabilities: [ { name: 'desktop', browserName: 'chrome', chromeOptions: { args: [ '--window-size=1024,768', ], }, }, { name: 'mobile', browserName: 'chrome', chromeOptions: { args: [ '--window-size=375,667', ], }, }, ], specs: [ path.resolve(__dirname, './**/*.spec.js'), ], setViewport() { }, beforeLaunch() { }, onComplete() { browser.manage().logs().get('browser').then((browserLog) => { console.log(`log: ${util.inspect(browserLog)}`); // eslint-disable-line no-console }); }, }; return config; };