configurable e2e host

stable
Juanfran 2016-05-18 07:41:48 +02:00
parent 9e0f411582
commit fece2e2737
2 changed files with 19 additions and 13 deletions

View File

@ -183,4 +183,9 @@ if (argv.seleniumAddress) {
config.seleniumAddress = argv.seleniumAddress;
}
if (argv.host) {
config.params.glob.host = argv.host;
}
exports.config = config;

View File

@ -37,20 +37,21 @@ function backup() {
function launchProtractor(suit) {
let protractorParams = ['conf.e2e.js', '--suite=' + suit, '--back=' + taigaBackPath];
if (argv.json) {
protractorParams.push('--json');
}
var discard = [
"_",
"s",
"a",
"b"
];
if (argv.ie) {
protractorParams.push('--ie');
for(var arg in argv) {
if (discard.indexOf(arg) === -1) {
if(typeof argv[arg] === 'boolean') {
protractorParams.push('--' + arg);
} else {
protractorParams.push('--' + arg + "=" + argv[arg]);
}
if (argv.firefox) {
protractorParams.push('--firefox');
}
if (argv.seleniumAddress) {
protractorParams.push('--seleniumAddress=' + argv.seleniumAddress);
}
child_process.spawnSync('protractor', protractorParams, {stdio: "inherit"});