diff options
Diffstat (limited to 'tests/acceptance/run-local.sh')
-rwxr-xr-x | tests/acceptance/run-local.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/acceptance/run-local.sh b/tests/acceptance/run-local.sh index 38e23588b18..eda119d74cc 100755 --- a/tests/acceptance/run-local.sh +++ b/tests/acceptance/run-local.sh @@ -159,6 +159,18 @@ if [ "$NEXTCLOUD_SERVER_DOMAIN" != "$DEFAULT_NEXTCLOUD_SERVER_DOMAIN" ]; then sed --in-place "s/$ORIGINAL/$REPLACEMENT/" $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml fi +# Due to a bug in the Mink Extension for Behat it is not possible to use the +# "paths.base" parameter in the path to the custom Firefox profile. Thus, the +# default "behat.yml" configuration file has to be adjusted to replace the +# parameter by its value before the configuration file is parsed by Behat. +ORIGINAL="profile: %paths.base%" +REPLACEMENT="profile: $ACCEPTANCE_TESTS_CONFIG_DIR" +# As the substitution does not involve regular expressions or multilines it can +# be done just with Bash. Moreover, this does not require escaping the regular +# expression characters that may appear in the path, like "/". +FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml) +echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml + if [ "$SELENIUM_SERVER" != "$DEFAULT_SELENIUM_SERVER" ]; then # Set the Selenium server to be used by Mink; this extends the default # configuration from "config/behat.yml". |