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:
commit
88e62323b6
3 changed files with 37 additions and 8 deletions
2
Gemfile
2
Gemfile
|
@ -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'
|
||||
|
|
20
Gemfile.lock
20
Gemfile.lock
|
@ -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
|
||||
|
|
23
spec/system/users/sign_in_spec.rb
Normal file
23
spec/system/users/sign_in_spec.rb
Normal 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
|
Loading…
Add table
Reference in a new issue