Skip to content

Commit

Permalink
fixe les tests suite au changement de wording sur les layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
kara22 committed Aug 23, 2024
1 parent 1da79ae commit 90875e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions spec/system/france_connect/france_connect_particulier_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
before { page.find('.fr-connect').click }

scenario 'he is redirected to user dossiers page' do
expect(page).to have_content("Choisissez votre e-mail de contact")
expect(page).to have_content("Choisissez votre email de contact pour finaliser votre connexion")
find('#use_fc_email').click
expect(page).to have_content("Confirmation envoyée")
expect(page).to have_content("Confirmez votre email")
click_on 'Continuer'
expect(User.find_by(email: email)).not_to be nil
end

scenario 'he can choose not to use FranceConnect email and input an alternative email' do
expect(page).to have_content("Choisissez votre e-mail de contact")
expect(page).to have_content("Choisissez votre email de contact pour finaliser votre connexion")

expect(page).to have_selector("input[name='email']", visible: true, wait: 10)

Expand Down
4 changes: 2 additions & 2 deletions spec/system/users/dossier_prefill_get_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@

page.find('.fr-connect').click

expect(page).to have_content("Choisissez votre e-mail de contact")
expect(page).to have_content("Choisissez votre email de contact pour finaliser votre connexion")
expect(page).to have_selector("#use_fc_email", visible: false, wait: 10)
page.execute_script('document.getElementById("use_fc_email").click()')

expect(page).to have_content("Confirmation envoyée")
expect(page).to have_content("Confirmez votre email")

click_on 'Continuer'
expect(page).to have_content('Vous avez un dossier prérempli')
Expand Down
4 changes: 2 additions & 2 deletions spec/system/users/dossier_prefill_post_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@
allow(FranceConnectService).to receive(:retrieve_user_informations_particulier).and_return(build(:france_connect_information))

page.find('.fr-connect').click
expect(page).to have_content("Choisissez votre e-mail de contact")
expect(page).to have_content("Choisissez votre email de contact pour finaliser votre connexion")
expect(page).to have_selector("#use_france_connect_email_yes", visible: false, wait: 10)
page.execute_script('document.getElementById("use_france_connect_email_yes").click()')

click_on 'Confirmer'
expect(page).to have_content("Confirmation envoyée")
expect(page).to have_content("Confirmez votre email")
click_on 'Continuer'
expect(page).to have_content('Vous avez un dossier prérempli')
find('.fr-btn.fr-mb-2w', text: 'Poursuivre mon dossier prérempli', wait: 10).click
Expand Down

0 comments on commit 90875e6

Please sign in to comment.