-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for testing languages #184
Conversation
Big 👍 for this one! |
One of the Travis test bots stalled, but it doesn't seem to be possible to trigger a retest. I'll have to make a new commit. |
I restarted the test. |
@@ -17,7 +17,7 @@ | |||
"behat/mink-selenium2-driver": "~1.1", | |||
"behat/behat": "~3.0,>=3.0.5", | |||
"behat/mink-extension": "~2.0", | |||
"drupal/drupal-driver": "~1.0@dev" | |||
"drupal/drupal-driver": "dev-language" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be switched back now as I've merged jhedstrom/DrupalDriver#45
This looks great. Small change mentioned above, and then it should be good to go! |
This reverts commit 55f03a4.
Add support for testing languages
Awesome, thanks! |
Sorry to comment on an old thread but it was not clear how to test for translations when in fact the DrupalExtension itself has hardcoded English strings:
This scenario may result in an error if you have another default language as it tries to login using the English strings: You can override the strings in your behat.yml configuration.
See https://www.drupal.org/project/drupalextension/issues/2145691#comment-9946699 |
Extract and store uid in DrushDriver::userCreate()
It would be nice if we could add support for testing languages. I'm using Behat for an internal Drupal platform that is used in the European Commission, and we are currently supporting 24 languages :)
This pull requests adds a step definition for enabling additional languages in tests:
This is currently depending on my fork of Drupal Driver that adds the respective functionality for creating and deleting languages. The sister pull request for Drupal Driver is here: jhedstrom/DrupalDriver#45
In case this is accepted we would need to revert commit 55f03a4 before merging this in. That commit points the Drupal Driver dependency to my own fork.