diff --git a/app/views/shared/dossiers/editable_champs/_champ_label_content.html.haml b/app/views/shared/dossiers/editable_champs/_champ_label_content.html.haml index 39902cb87..54e056eb4 100644 --- a/app/views/shared/dossiers/editable_champs/_champ_label_content.html.haml +++ b/app/views/shared/dossiers/editable_champs/_champ_label_content.html.haml @@ -1,5 +1,5 @@ #{champ.libelle} -- if champ.mandatory? +- if champ.type_de_champ.mandatory? %span.mandatory * - if champ.updated_at.present? && seen_at.present? diff --git a/app/views/shared/dossiers/editable_champs/_linked_drop_down_list.html.haml b/app/views/shared/dossiers/editable_champs/_linked_drop_down_list.html.haml index 8f4f5e610..a26818b2a 100644 --- a/app/views/shared/dossiers/editable_champs/_linked_drop_down_list.html.haml +++ b/app/views/shared/dossiers/editable_champs/_linked_drop_down_list.html.haml @@ -7,7 +7,7 @@ .secondary{ class: champ.has_secondary_options_for_primary? ? '' : 'hidden' } = form.label :secondary_value, for: "#{champ.input_id}-secondary" do = champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première" - - if champ.mandatory? + - if champ.type_de_champ.mandatory? %span.mandatory * - if champ.drop_down_secondary_description.present? .notice{ id: "#{champ.describedby_id}-secondary" }= string_to_html(champ.drop_down_secondary_description) diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index edbc0d739..f520c3ead 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -299,7 +299,7 @@ describe 'The user' do fill_individual fill_in('age', with: '18') - expect(page).to have_css('label', text: 'nom', visible: :visible) + expect(page).to have_css('label', text: 'nom *', visible: :visible) click_on 'Déposer le dossier' expect(page).to have_current_path(brouillon_dossier_path(user_dossier))