fix: FranceConnect button was not visible anymore, convert to DSFR
This commit is contained in:
parent
cffa8d0b69
commit
7e1c542807
6 changed files with 18 additions and 13 deletions
|
@ -7,7 +7,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.france-connect-login-buttons,
|
||||
.france-connect-help-link {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
@import '@gouvfr/dsfr/dist/component/button/button.css';
|
||||
@import '@gouvfr/dsfr/dist/component/alert/alert.css';
|
||||
@import '@gouvfr/dsfr/dist/component/callout/callout.css';
|
||||
@import '@gouvfr/dsfr/dist/component/connect/connect.css';
|
||||
@import '@gouvfr/dsfr/dist/component/breadcrumb/breadcrumb.css';
|
||||
@import '@gouvfr/dsfr/dist/component/table/table.css';
|
||||
@import '@gouvfr/dsfr/dist/component/modal/modal.css';
|
||||
|
|
|
@ -4,10 +4,15 @@
|
|||
= t('views.shared.france_connect_login.title')
|
||||
%p
|
||||
= t('views.shared.france_connect_login.description')
|
||||
.france-connect-login-buttons
|
||||
= link_to t('views.shared.france_connect_login.login_button'), url, class: "france-connect-login-button"
|
||||
.france-connect-help-link
|
||||
= link_to t('views.shared.france_connect_login.help_link'), "https://franceconnect.gouv.fr/", target: "_blank", rel: "noopener", class: "link"
|
||||
|
||||
.fr-connect-group.fr-my-2w
|
||||
= link_to(url, class: "fr-btn fr-connect") do
|
||||
%span.fr-connect__login
|
||||
= t('views.shared.france_connect_login.login_button')
|
||||
%span.fr-connect__brand FranceConnect
|
||||
%p
|
||||
= link_to t('views.shared.france_connect_login.help_link'), "https://franceconnect.gouv.fr/", target: "_blank", rel: "noopener", class: "fr-underlined"
|
||||
|
||||
.france-connect-login-separator
|
||||
= t('views.shared.france_connect_login.separator')
|
||||
- else
|
||||
|
|
|
@ -12,7 +12,7 @@ en:
|
|||
france_connect_login:
|
||||
title: "With FranceConnect"
|
||||
description: "FranceConnect is a solution proposed by the government to secure and simplify the connection to web services."
|
||||
login_button: "Sign in with FranceConnect"
|
||||
login_button: "Sign in with"
|
||||
help_link: What is FranceConnect?
|
||||
separator: or
|
||||
account:
|
||||
|
|
|
@ -12,7 +12,7 @@ fr:
|
|||
france_connect_login:
|
||||
title: 'Avec FranceConnect'
|
||||
description: "FranceConnect est la solution proposée par l’État pour sécuriser et simplifier la connexion aux services en ligne."
|
||||
login_button: "S’identifier avec FranceConnect"
|
||||
login_button: "S’identifier avec"
|
||||
help_link: "Qu’est-ce que FranceConnect ?"
|
||||
separator: 'ou'
|
||||
account:
|
||||
|
|
|
@ -24,7 +24,7 @@ describe 'France Connect Particulier Connexion' do
|
|||
before { visit new_user_session_path }
|
||||
|
||||
scenario 'link to France Connect is present' do
|
||||
expect(page).to have_css('.france-connect-login-button')
|
||||
expect(page).to have_css('.fr-connect')
|
||||
end
|
||||
|
||||
context 'and click on france connect link' do
|
||||
|
@ -38,7 +38,7 @@ describe 'France Connect Particulier Connexion' do
|
|||
let(:france_connect_information) { build(:france_connect_information, user_info) }
|
||||
|
||||
context 'and no user has the same email' do
|
||||
before { page.find('.france-connect-login-button').click }
|
||||
before { page.find('.fr-connect').click }
|
||||
|
||||
scenario 'he is redirected to user dossiers page' do
|
||||
expect(page).to have_content('Dossiers')
|
||||
|
@ -50,7 +50,7 @@ describe 'France Connect Particulier Connexion' do
|
|||
let!(:user) { create(:user, email: email, password: 'my-s3cure-p4ssword') }
|
||||
|
||||
before do
|
||||
page.find('.france-connect-login-button').click
|
||||
page.find('.fr-connect').click
|
||||
end
|
||||
|
||||
scenario 'he is redirected to the merge page' do
|
||||
|
@ -99,7 +99,7 @@ describe 'France Connect Particulier Connexion' do
|
|||
create(:france_connect_information, :with_user, user_info.merge(created_at: Time.zone.parse('12/12/2012'), updated_at: Time.zone.parse('12/12/2012')))
|
||||
end
|
||||
|
||||
before { page.find('.france-connect-login-button').click }
|
||||
before { page.find('.fr-connect').click }
|
||||
|
||||
scenario 'he is redirected to user dossiers page' do
|
||||
expect(page).to have_content('Dossiers')
|
||||
|
@ -115,11 +115,11 @@ describe 'France Connect Particulier Connexion' do
|
|||
before do
|
||||
allow_any_instance_of(FranceConnectParticulierClient).to receive(:authorization_uri).and_return(france_connect_particulier_callback_path(code: code))
|
||||
allow(FranceConnectService).to receive(:retrieve_user_informations_particulier) { raise Rack::OAuth2::Client::Error.new(500, error: 'Unknown') }
|
||||
page.find('.france-connect-login-button').click
|
||||
page.find('.fr-connect').click
|
||||
end
|
||||
|
||||
scenario 'he is redirected to login page' do
|
||||
expect(page).to have_css('.france-connect-login-button')
|
||||
expect(page).to have_css('.fr-connect')
|
||||
end
|
||||
|
||||
scenario 'error message is displayed' do
|
||||
|
|
Loading…
Reference in a new issue