This commit is contained in:
Kara Diaby 2023-09-05 12:42:56 +00:00
parent 47f305216f
commit be55bba553
8 changed files with 35 additions and 36 deletions

View file

@ -15,13 +15,13 @@
= f.label :gender, t('activerecord.attributes.individual.gender')
.fr-fieldset__element.fr-fieldset__element--inline
.fr-radio-group
= f.radio_button :gender, Individual::GENDER_FEMALE, required: true, id: "#identite_champ_radio_#{Individual::GENDER_FEMALE}"
%label.fr-label{ for: "#identite_champ_radio_#{Individual::GENDER_FEMALE}" }
= f.radio_button :gender, Individual::GENDER_FEMALE, required: true, id: "identite_champ_radio_#{Individual::GENDER_FEMALE}"
%label.fr-label{ for: "identite_champ_radio_#{Individual::GENDER_FEMALE}" }
= Individual.human_attribute_name('gender.female')
.fr-fieldset__element.fr-fieldset__element--inline
.fr-radio-group
= f.radio_button :gender, Individual::GENDER_MALE, required: true, id: "#identite_champ_radio_#{Individual::GENDER_MALE}"
%label.fr-label{ for: "#identite_champ_radio_#{Individual::GENDER_MALE}" }
= f.radio_button :gender, Individual::GENDER_MALE, required: true, id: "identite_champ_radio_#{Individual::GENDER_MALE}"
%label.fr-label{ for: "identite_champ_radio_#{Individual::GENDER_MALE}" }
= Individual.human_attribute_name('gender.male')
.flex

View file

@ -109,9 +109,9 @@ describe 'wcag rules for usager', js: true, retry: 3 do
scenario "dépot d'un dossier" do
click_on 'Commencer la démarche'
choose 'Monsieur'
fill_in('individual_prenom', with: 'prenom')
fill_in('individual_nom', with: 'nom')
find('label', text: 'Monsieur')
fill_in('identite_champ_first_name', with: 'prenom')
fill_in('identite_champ_last_name', with: 'nom')
click_on 'Continuer'
expect(page).to be_axe_clean

View file

@ -266,9 +266,9 @@ describe 'fetch API Particulier Data', js: true, retry: 3 do
visit commencer_path(path: procedure.path)
click_on 'Commencer la démarche'
choose 'Monsieur'
fill_in 'individual_nom', with: 'Nom'
fill_in 'individual_prenom', with: 'Prenom'
find('label', text: 'Monsieur').click
fill_in('identite_champ_first_name', with: 'prenom')
fill_in('identite_champ_last_name', with: 'nom')
click_button('Continuer')
@ -325,9 +325,9 @@ describe 'fetch API Particulier Data', js: true, retry: 3 do
visit commencer_path(path: procedure.path)
click_on 'Commencer la démarche'
choose 'Monsieur'
fill_in 'individual_nom', with: 'Moustaki'
fill_in 'individual_prenom', with: 'Georges'
find('label', text: 'Monsieur').click
fill_in('identite_champ_first_name', with: 'Georges')
fill_in('identite_champ_last_name', with: 'Moustaki')
click_button('Continuer')
@ -399,9 +399,9 @@ describe 'fetch API Particulier Data', js: true, retry: 3 do
visit commencer_path(path: procedure.path)
click_on 'Commencer la démarche'
choose 'Madame'
fill_in 'individual_nom', with: 'Dubois'
fill_in 'individual_prenom', with: 'Angela Claire Louise'
find('label[for="identite_champ_radio_Mme"]').click
fill_in('identite_champ_last_name', with: 'Dubois')
fill_in('identite_champ_first_name', with: 'Angela Claire Louise')
click_button('Continuer')
@ -463,9 +463,9 @@ describe 'fetch API Particulier Data', js: true, retry: 3 do
visit commencer_path(path: procedure.path)
click_on 'Commencer la démarche'
choose 'Madame'
fill_in 'individual_nom', with: 'FERRI'
fill_in 'individual_prenom', with: 'Karine'
find('label[for="identite_champ_radio_Mme"]').click
fill_in('identite_champ_last_name', with: 'FERRI')
fill_in('identite_champ_first_name', with: 'Karine')
click_button('Continuer')

View file

@ -262,9 +262,9 @@ describe 'The routing with rules', js: true, retry: 3 do
visit commencer_path(path: procedure.reload.path)
click_on 'Commencer la démarche'
choose 'Monsieur'
fill_in 'individual_nom', with: 'Nom'
fill_in 'individual_prenom', with: 'Prenom'
find('label', text: 'Monsieur').click
fill_in('identite_champ_first_name', with: 'Prenom')
fill_in('identite_champ_last_name', with: 'Nom')
click_button('Continuer')
# the old system should not be present

View file

@ -10,7 +10,6 @@ describe 'The user' do
log_in(user, procedure)
fill_individual
# fill data
fill_in('text', with: 'super texte', match: :first)
fill_in('textarea', with: 'super textarea')
@ -22,7 +21,7 @@ describe 'The user' do
fill_in('integer_number', with: '12')
scroll_to(find_field('checkbox'), align: :center)
find('label', text: 'checkbox').click
choose('Madame')
find('label', text: 'Madame').click
fill_in('email', with: 'loulou@yopmail.com')
fill_in('phone', with: '0123456789')
scroll_to(find_field('Non'), align: :center)
@ -556,8 +555,8 @@ describe 'The user' do
def fill_individual
find('label', text: 'Monsieur').click
fill_in('individual_prenom', with: 'prenom')
fill_in('individual_nom', with: 'nom')
fill_in('identite_champ_first_name', with: 'prenom')
fill_in('identite_champ_last_name', with: 'nom')
click_on 'Continuer'
expect(page).to have_current_path(brouillon_dossier_path(user_dossier))
end

View file

@ -21,9 +21,9 @@ describe 'Creating a new dossier:' do
expect(page).to have_current_path identite_dossier_path(user.reload.dossiers.last)
expect(page).to have_title(libelle)
choose 'Monsieur'
fill_in 'individual_nom', with: 'Nom'
fill_in 'individual_prenom', with: 'Prenom'
find('label', text: 'Monsieur').click
fill_in('identite_champ_first_name', with: 'Prenom')
fill_in('identite_champ_last_name', with: 'Nom')
end
shared_examples 'the user can create a new draft' do
@ -41,7 +41,7 @@ describe 'Creating a new dossier:' do
let(:expected_birthday) { Date.new(1987, 10, 14) }
before do
fill_in 'individual_birthdate', with: birthday_format
fill_in 'identite_champ_birthdate', with: birthday_format
end
context 'when the browser supports `type=date` input fields' do

View file

@ -74,9 +74,9 @@ describe 'dropdown list with other option activated', js: true, retry: 3 do
private
def fill_individual
choose 'Monsieur'
fill_in('individual_prenom', with: 'prenom')
fill_in('individual_nom', with: 'nom')
find('label', text: 'Monsieur').click
fill_in('identite_champ_first_name', with: 'prenom')
fill_in('identite_champ_last_name', with: 'nom')
click_on 'Continuer'
expect(page).to have_current_path(brouillon_dossier_path(user_dossier))
end

View file

@ -80,9 +80,9 @@ describe 'linked dropdown lists' do
end
def fill_individual
choose 'Monsieur'
fill_in('individual_prenom', with: 'prenom')
fill_in('individual_nom', with: 'nom')
find('label', text: 'Monsieur').click
fill_in('identite_champ_first_name', with: 'prenom')
fill_in('identite_champ_last_name', with: 'nom')
click_on 'Continuer'
expect(page).to have_current_path(brouillon_dossier_path(user_dossier))
end