make the 'male' field selected by default during identity creation

This commit is contained in:
clemkeirua 2020-03-23 17:42:31 +01:00 committed by GitHub Action
parent 1bdc0836a6
commit a34b45e4f4
5 changed files with 14 additions and 2 deletions

View file

@ -12,8 +12,16 @@
%span.mandatory *
champs requis
= f.label :gender, class: "required"
= f.select :gender, [Individual::GENDER_MALE, Individual::GENDER_FEMALE], {}, class: "small"
%fieldset
%legend
= f.label :gender, class: "required"
.radios
%label
= f.radio_button :gender, Individual::GENDER_MALE
= Individual::GENDER_MALE
%label
= f.radio_button :gender, Individual::GENDER_FEMALE
= Individual::GENDER_FEMALE
.flex
.inline-champ

View file

@ -189,6 +189,7 @@ feature 'The routing', js: true do
visit commencer_path(path: procedure.reload.path)
click_on 'Commencer la démarche'
choose 'M.'
fill_in 'individual_nom', with: 'Nom'
fill_in 'individual_prenom', with: 'Prenom'
click_button('Continuer')

View file

@ -282,6 +282,7 @@ feature 'The user' do
end
def fill_individual
choose 'M.'
fill_in('individual_prenom', with: 'prenom')
fill_in('individual_nom', with: 'nom')
click_on 'Continuer'

View file

@ -22,6 +22,7 @@ feature 'Creating a new dossier:' do
expect(page).to have_current_path identite_dossier_path(user.reload.dossiers.last)
expect(page).to have_procedure_description(procedure)
choose 'M.'
fill_in 'individual_nom', with: 'Nom'
fill_in 'individual_prenom', with: 'Prenom'
end

View file

@ -62,6 +62,7 @@ feature 'linked dropdown lists' do
end
def fill_individual
choose 'M.'
fill_in('individual_prenom', with: 'prenom')
fill_in('individual_nom', with: 'nom')
click_on 'Continuer'