Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 28dd8854 rédigé par Steffen van Bergerem's avatar Steffen van Bergerem Validation de Dennis Schubert
Parcourir les fichiers

Add cuke for changing the preferred language

closes #7053
parent ce7d008e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
@javascript @javascript
Feature: Change email Feature: Change settings
Scenario: Change my email Background:
Given I am signed in Given I am signed in
When I go to the edit user page When I go to the edit user page
And I fill in the following:
Scenario: Change my email
When I fill in the following:
| user_email | new_email@newplac.es | | user_email | new_email@newplac.es |
And I press "Change email" And I press "Change email"
Then I should see "Email changed" Then I should see "Email changed"
...@@ -13,9 +15,13 @@ Feature: Change email ...@@ -13,9 +15,13 @@ Feature: Change email
And my "email" should be "new_email@newplac.es" And my "email" should be "new_email@newplac.es"
Scenario: Change my email preferences Scenario: Change my email preferences
Given I am signed in When I uncheck "user_email_preferences_mentioned"
When I go to the edit user page
And I uncheck "user_email_preferences_mentioned"
And I press "change_email_preferences" And I press "change_email_preferences"
Then I should see "Email notifications changed" Then I should see "Email notifications changed"
And the "user_email_preferences_mentioned" checkbox should not be checked And the "user_email_preferences_mentioned" checkbox should not be checked
Scenario: Change my preferred language
When I select "polski" from "user_language"
And I press "Change language"
Then I should see "Język został zmieniony"
And "polski" should be selected from "user_language"
...@@ -160,6 +160,12 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do | ...@@ -160,6 +160,12 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |
end end
end end
Then /^"([^"]*)" should be selected from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector|
with_scope(selector) do
expect(page).to have_select(field, selected: value)
end
end
Then /^the "([^"]*)" bootstrap-switch should be (on|off)$/ do |label, state| Then /^the "([^"]*)" bootstrap-switch should be (on|off)$/ do |label, state|
if state == "on" if state == "on"
expect(page.evaluate_script("$('#{label}').bootstrapSwitch('state')")).to be_truthy expect(page.evaluate_script("$('#{label}').bootstrapSwitch('state')")).to be_truthy
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter