Merge pull request #9949 from mfo/US/fix-device-locale

correctif: ETQ usager naviguant sur le site en anglais, je m'attends a recevoir des messages d'erreur de connexion en anglais
This commit is contained in:
Colin Darie 2024-01-31 09:28:15 +00:00 committed by GitHub
commit 88e62323b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 8 deletions

View file

@ -25,7 +25,7 @@ gem 'deep_cloneable' # Enable deep clone of active record models
gem 'delayed_cron_job' # Cron jobs
gem 'delayed_job_active_record'
gem 'delayed_job_web'
gem 'devise' # Gestion des comptes utilisateurs
gem 'devise', git: 'https://github.com/heartcombo/devise.git', ref: "edffc79bf05d7f1c58ba50ffeda645e2e4ae0cb1" # Gestion des comptes utilisateurs, drop ref on next release: 4.9.4
gem 'devise-i18n'
gem 'devise-two-factor'
gem 'discard'

View file

@ -1,3 +1,15 @@
GIT
remote: https://github.com/heartcombo/devise.git
revision: edffc79bf05d7f1c58ba50ffeda645e2e4ae0cb1
ref: edffc79bf05d7f1c58ba50ffeda645e2e4ae0cb1
specs:
devise (4.9.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
GEM
remote: https://rubygems.org/
specs:
@ -189,12 +201,6 @@ GEM
sinatra (>= 1.4.4)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (4.9.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-i18n (1.9.2)
devise (>= 4.7.1)
devise-two-factor (5.0.0)
@ -847,7 +853,7 @@ DEPENDENCIES
delayed_cron_job
delayed_job_active_record
delayed_job_web
devise
devise!
devise-i18n
devise-two-factor
discard

View file

@ -0,0 +1,23 @@
describe 'Sign in', js: true do
let(:user) { create(:user) }
scenario 'when a user is logged in english' do
visit root_path
within(".fr-header__tools") do
find('.fr-translate__btn').click
end
within("#translate") do
click_on("EN - English")
end
expect(page).to have_content("Sign in")
within(".fr-header__tools") do
click_on("Sign in")
end
expect(page).to have_content("With FranceConnect")
fill_in(:user_email, with: user.email)
fill_in(:user_password, with: 'wrong password')
click_on("Sign in")
expect(page).to have_content("Invalid Email or password.")
end
end