aboutsummaryrefslogtreecommitdiffstats
path: root/tests/acceptance/config
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-06-22 18:29:08 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-06-22 19:46:44 +0200
commitd70b6bc94b9e24f04596a8e662ab3693db611f67 (patch)
treefd767459e09c91fb92e3abdd6833b6d5c36a9837 /tests/acceptance/config
parent082646f7e542a02c4a18a49b070a578069e209a6 (diff)
downloadnextcloud-server-d70b6bc94b9e24f04596a8e662ab3693db611f67.tar.gz
nextcloud-server-d70b6bc94b9e24f04596a8e662ab3693db611f67.zip
Set "wd_host" directly in "behat.yml" instead of through "BEHAT_PARAMS"
The "wd_host" parameter of Selenium2 sessions specify the URL used by the Selenium driver to connect with the Selenium server. Thus, when the Selenium server is at a different host or port than the default one (for example, when run on Drone) the "wd_host" parameter must be set for each of the Selenium2 sessions defined in "behat.yml". The "BEHAT_PARAMS" environment variable, which extends the "behat.yml" configuration file, was used for that. However, this required adding to the "BEHAT_PARAMS" in "run-local.sh" each new session added to "behat.yml", including those added in the acceptance tests of apps. To address that limitation, this commit introduces a simulated variable, "selenium.server"; just before the acceptance tests are run the "selenium.server" variable in the "wd_host" parameter is replaced in the "behat.yml" file used by the acceptance tests. Note that the file that is modified is the one inside the Docker container used to run the acceptance tests, so the original file is not touched. Note that a simulated variable is needed because Behat does not support overridding nor setting configuration parameters with environment variables. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/config')
-rw-r--r--tests/acceptance/config/behat.yml10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml
index 55d2ff3a6f4..e1248e18a81 100644
--- a/tests/acceptance/config/behat.yml
+++ b/tests/acceptance/config/behat.yml
@@ -27,14 +27,18 @@ default:
Behat\MinkExtension:
sessions:
default:
- selenium2: ~
+ selenium2:
+ wd_host: %selenium.server%
John:
- selenium2: ~
+ selenium2:
+ wd_host: %selenium.server%
Jane:
- selenium2: ~
+ selenium2:
+ wd_host: %selenium.server%
Rubeus:
# Rubeus uses a browser that has CSS grid support.
selenium2:
+ wd_host: %selenium.server%
capabilities:
firefox:
profile: %paths.base%/firefox-profiles/css-grid-enabled.zip