Corrige l'affichage du radio-button "Personne morale" (#4081)

Administrateur : corrige l'affichage du radio-button "Personne morale"
This commit is contained in:
Pierre de La Morinerie 2019-07-11 11:54:19 +02:00 committed by GitHub
commit 34cc3793a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -62,7 +62,7 @@ class Admin::ProceduresController < AdminController
end
def new
@procedure ||= Procedure.new
@procedure ||= Procedure.new(for_individual: true)
@availability = Procedure::PATH_AVAILABLE
end

View file

@ -100,7 +100,7 @@
%h4 À qui sadresse ma démarche ?
.checkbox
%label
= f.radio_button :for_individual, 1, :checked => true
= f.radio_button :for_individual, true
%b Ma démarche sadresse à un particulier
%p
@ -108,7 +108,7 @@
.checkbox
%label
= f.radio_button :for_individual, 0, :checked => false
= f.radio_button :for_individual, false
%b Ma démarche sadresse à une personne morale
%p

View file

@ -36,6 +36,8 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
click_on 'from-scratch'
expect(page).to have_current_path(new_admin_procedure_path)
expect(find('#procedure_for_individual_true')).to be_checked
expect(find('#procedure_for_individual_false')).not_to be_checked
fill_in 'procedure_duree_conservation_dossiers_dans_ds', with: '3'
fill_in 'procedure_duree_conservation_dossiers_hors_ds', with: '6'
click_on 'save-procedure'