Merge pull request #6231 from betagouv/i18n-selector-test

i18n : ajout d'un test pour le sélecteur de langues (#6231)
This commit is contained in:
Pierre de La Morinerie 2021-05-27 11:10:43 +02:00 committed by GitHub
commit 44ff3401ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,19 @@
feature 'Accessing the website in different languages:' do
context 'when the i18n feature-flag is enabled' do
before { ENV['LOCALIZATION_ENABLED'] = 'true' }
after { ENV['LOCALIZATION_ENABLED'] = 'false' }
scenario 'I can change the language of the page' do
visit new_user_session_path
expect(page).to have_text('Connectez-vous')
click_on 'Translate'
click_on 'EN - English'
# The page is now in English
expect(page).to have_text('Sign in')
# The page URL stayed the same
expect(page).to have_current_path(new_user_session_path)
end
end
end