Add workaround for parameter not available in Mink Extension #9665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds a workaround for a bug in the Mink Extension for Behat used in the acceptance tests.
When the Selenium2 driver is configured in the Mink Extension an
InvalidConfigurationExceptionis thrown if the file for the custom Firefox profile does not exist. However, at that point the parameters have not been replaced yet by their value, so the path that is verified is the raw value specified in the behat.yml file. Thus, when a paramater is used in that path the path is always seen as invalid, even if it would be valid once the parameter was replaced by its value.Due to that bug it is not possible to use the
paths.baseparameter in the path to the custom Firefox profile in behat.yml.paths.baseis a special parameter in the Behat configuration that refers to the directory in which behat.yml is stored. This comes in very handy to set the path to custom Firefox profiles in the acceptance tests for apps, as even if the behat.yml file belongs to an app its paths are relative to the directory in which the tests are run, that is, the tests/acceptance directory of the server.Until the bug is fixed, just before the acceptance tests are run the
paths.baseparameter in the path to the custom Firefox profile is replaced by its value 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.