Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function _installDependencies () {
DEBUG && console.log('[xolvio:cucumber] Attempting to install chimp dependencies');
if (DEBUG) {
process.env['chimp.debug'] = true;
}
Meteor.wrapAsync(Npm.require('chimp').install)();
}
log.debug('[chimp][helper] getting browser');
var webdriverioConfigOptions = JSON.parse(process.env['chimp.webdriverio']);
var webdriverioOptions = (0, _deepExtend2.default)(webdriverioConfigOptions, {
desiredCapabilities: {
browserName: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.browser']),
platform: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.platform']),
name: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.name']),
version: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.version']),
deviceName: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.deviceName'])
},
user: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.user'] || process.env.SAUCE_USERNAME),
key: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.key'] || process.env.SAUCE_ACCESS_KEY),
host: (0, _environmentVariableParsers.parseNullableString)(process.env['chimp.host']),
port: (0, _environmentVariableParsers.parseNullableInteger)(process.env['chimp.port']),
logLevel: booleanHelper.isTruthy(process.env['chimp.debug']) ? 'verbose' : webdriverioConfigOptions.logLevel,
sync: (0, _environmentVariableParsers.parseBoolean)(process.env['chimp.sync'])
});
global.sessionManager = new SessionFactory((0, _assign2.default)(_.pick(webdriverioOptions, 'host', 'port', 'user', 'key'), {
browser: webdriverioOptions.desiredCapabilities.browserName,
deviceName: webdriverioOptions.desiredCapabilities.deviceName
}));
if (booleanHelper.isTruthy(process.env['chimp.watch'])) {
webdriverioOptions.desiredCapabilities.applicationCacheEnabled = false;
}
log.debug('[chimp][helper] webdriverioOptions are ', (0, _stringify2.default)(webdriverioOptions));
var remoteSession = void 0;
if ((0, _environmentVariableParsers.parseNullableInteger)(process.env['CUCUMBER_BROWSERS'])) {
var options = _.clone(webdriverioOptions);
var log = require('loglevel'),
minimist = require('minimist');
var argv = minimist(process.argv, {
'default': {
'debug': false,
'log': 'info'
}, 'boolean': true
}) || [];
var debug =
process.env['chimp.debug'] === 'true' ? true :
process.env['chimp.debug'] === 'false' ? false :
process.env['chimp.debug']
|| process.env.DEBUG === 'true'
|| process.env.DEBUG === '1'
|| argv.debug;
if (debug) {
log.setLevel('debug');
} else {
log.setLevel(argv.log);
}
module.exports = log;
const webdriverioConfigOptions = JSON.parse(process.env['chimp.webdriverio']);
const webdriverioOptions = merge(
webdriverioConfigOptions,
{
desiredCapabilities: {
browserName: parseNullableString(process.env['chimp.browser']),
platform: parseNullableString(process.env['chimp.platform']),
name: parseNullableString(process.env['chimp.name']),
version: parseNullableString(process.env['chimp.browserVersion']),
deviceName: parseNullableString(process.env['chimp.deviceName']),
},
user: parseNullableString(process.env['chimp.user'] || process.env.SAUCE_USERNAME),
key: parseNullableString(process.env['chimp.key'] || process.env.SAUCE_ACCESS_KEY),
host: parseNullableString(process.env['chimp.host']),
port: parseNullableInteger(process.env['chimp.port']),
logLevel: booleanHelper.isTruthy(process.env['chimp.debug']) ?
'verbose' : webdriverioConfigOptions.logLevel,
sync: parseBoolean(process.env['chimp.sync']),
}
);
global.sessionManager = new SessionFactory(Object.assign(
_.pick(webdriverioOptions, 'host', 'port', 'user', 'key'),
{
browser: webdriverioOptions.desiredCapabilities.browserName,
deviceName: webdriverioOptions.desiredCapabilities.deviceName,
}
));
if (booleanHelper.isTruthy(process.env['chimp.watch'])) {
webdriverioOptions.desiredCapabilities.applicationCacheEnabled = false;
}
var log = require('loglevel'),
minimist = require('minimist');
var argv = minimist(process.argv, {
'default': {
'debug': false,
'log': 'info'
}, 'boolean': true
}) || [];
var debug =
process.env['chimp.debug'] === 'true' ? true :
process.env['chimp.debug'] === 'false' ? false :
process.env['chimp.debug']
|| process.env.DEBUG === 'true'
|| process.env.DEBUG === '1'
|| argv.debug;
if (debug) {
log.setLevel('debug');
} else {
log.setLevel(argv.log);
}
module.exports = log;