From 7031a80c888abd0a9c2f76af111325366fde29ab Mon Sep 17 00:00:00 2001 From: Juanfran Date: Tue, 17 May 2016 09:05:58 +0200 Subject: [PATCH] select browser in e2e --- conf.e2e.js | 13 +++++++++++++ run-e2e.js | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/conf.e2e.js b/conf.e2e.js index d61df045..b308fa06 100644 --- a/conf.e2e.js +++ b/conf.e2e.js @@ -158,4 +158,17 @@ if (argv.json) { config.mochaOpts.reporter = 'reporter-file'; } +if (argv.firefox) { + config.capabilities = { + browserName: 'firefox' + }; +} + +if (argv.ie) { + config.capabilities = { + browserName: 'internet explorer', + version: '11' + }; +} + exports.config = config; diff --git a/run-e2e.js b/run-e2e.js index f50e6a5f..298c7ae3 100644 --- a/run-e2e.js +++ b/run-e2e.js @@ -41,6 +41,14 @@ function launchProtractor(suit) { protractorParams.push('--json'); } + if (argv.ie) { + protractorParams.push('--ie'); + } + + if (argv.firefox) { + protractorParams.push('--firefox'); + } + child_process.spawnSync('protractor', protractorParams, {stdio: "inherit"}); }