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; config.seleniumAddress = argv.seleniumAddress;
} }
if (argv.host) {
config.params.glob.host = argv.host;
}
exports.config = config; exports.config = config;

View File

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