You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bundle exec rake
[...]
Failure/Error: fill_in "Restrict Access to IPs", :with => "127.0.0.1\n10.1.1.1/16"
Capybara::ElementNotFound:
Unable to find field "Restrict Access to IPs"
Screenshot of the failing test
The label Restrict Access to IPs was translated in Liste noire IP
In index.html I have tried to insert the following snippet (as discussed here) but it didn't worked (it wasn't a satisfying solution either)
<script>localStorage.lang='en';</script>
How the translation is working ? Is it based on the browser language ? It doesn't seems possible to force the language of phantomJS (at least with the command line)
Is it possible de assert the label with the term translated in the correct language ? I will gladly do a pull request on this issue but I need a bit of help
The text was updated successfully, but these errors were encountered:
We base the default language on the Accept-Language HTTP header browsers will supply (but we'd also be interested if that's not a good approach for international users, or if you'd prefer a more explicit option to set the language in the UI). I wasn't aware PhantomJS was setting a default, but I think it must be picking up your system language default somehow.
Could you try again after pulling the latest down from master? I've committed a change that I believe should fix this by explicitly setting the default language to english for the integration tests: 875db7f (but then we also have some existing tests to do some very basic locale support testing separately).
If that update doesn't fix things, could you supply the output of running the locale command on your computer?
We could also potentially update any of our tests to be locale aware (so, for example, our tests would look for the presence of I18n.t("mongoid.attributes.api/settings.allowed_ips") rather than "Restrict Access to IPs"). But my initial sense is that having a default language (and testing locale support separately) might be less error prone, so people can't accidentally commit tests that only work depending on your computer's default language. But let us know if you have any any other thoughts or preferences regarding this.
Bug report
Description
The test of the web-app fails because part of the labels are translated in French and the assertions are made in english 😢
Environment
I work on the master branch
Step to reproduce
Be in France ?
Screenshot of the failing test
The label
Restrict Access to IPs
was translated inListe noire IP
In
index.html
I have tried to insert the following snippet (as discussed here) but it didn't worked (it wasn't a satisfying solution either)How the translation is working ? Is it based on the browser language ? It doesn't seems possible to force the language of phantomJS (at least with the command line)
Is it possible de assert the label with the term translated in the correct language ? I will gladly do a pull request on this issue but I need a bit of help
The text was updated successfully, but these errors were encountered: