demarches-normaliennes/spec/system/i18n_spec.rb
Martin a4d6692bc6 accessibilite(pages-authentification): evolutions des pages de connexion/creation de compte pour respecter le DSFR et supporter une meilleure accessibilite
Update app/components/dsfr/input_component/input_component.html.haml

Co-authored-by: Colin Darie <colin@darie.eu>
2023-01-03 16:26:05 +01:00

19 lines
662 B
Ruby

describe '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("Connexion à #{APPLICATION_NAME}")
find('.fr-translate__btn').click
find('.fr-nav__link[hreflang="en"]').click
# 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