diff --git a/app/assets/stylesheets/forms.scss b/app/assets/stylesheets/forms.scss index 8155e482f..048252a6e 100644 --- a/app/assets/stylesheets/forms.scss +++ b/app/assets/stylesheets/forms.scss @@ -213,7 +213,7 @@ .fr-label { // la description d'un champ peut contenir du markup (markdown->html), // on herite donc la fontsize/mrgin/padding du fr-hint-text - .fr-hint-text > *{ + .fr-hint-text > * { font-size: inherit; margin: inherit; padding: inherit; @@ -223,7 +223,6 @@ input[type=password], select { display: block; - margin-bottom: $default-fields-spacer; margin-bottom: 0; &.small-margin { diff --git a/app/components/dsfr/input_errorable.rb b/app/components/dsfr/input_errorable.rb index 30f547a9c..9c8164172 100644 --- a/app/components/dsfr/input_errorable.rb +++ b/app/components/dsfr/input_errorable.rb @@ -103,7 +103,6 @@ module Dsfr def hint? I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}") end - end end end diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index bdddc6797..1734a32f9 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -419,7 +419,7 @@ describe 'The user' do let(:procedure) do create(:procedure, :published, :for_individual, types_de_champ_public: [ - { type: :integer_number, libelle: 'age', stable_id: age_stable_id }, + { type: :integer_number, libelle: 'age du candidat', stable_id: age_stable_id }, { type: :yes_no, libelle: 'permis de conduire', stable_id: permis_stable_id, condition: permis_condition }, { type: :header_section, libelle: 'info voiture', condition: permis_condition }, { type: :integer_number, libelle: 'tonnage', stable_id: tonnage_stable_id, condition: tonnage_condition }, @@ -432,12 +432,12 @@ describe 'The user' do fill_individual - expect(page).to have_css('label', text: 'age', visible: true) + expect(page).to have_css('label', text: 'age du candidat', visible: true) expect(page).to have_no_css('label', text: 'permis de conduire', visible: true) expect(page).to have_no_css('legend h2', text: 'info voiture', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true) - fill_in('age (facultatif)', with: '18') + fill_in('age du candidat (facultatif)', with: '18') expect(page).to have_css('label', text: 'permis de conduire', visible: true) expect(page).to have_css('legend h2', text: 'info voiture', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true) @@ -453,7 +453,7 @@ describe 'The user' do fill_in('tonnage (facultatif)', with: 'a') expect(page).to have_no_css('label', text: 'parking', visible: true) - fill_in('age (facultatif)', with: '2') + fill_in('age du candidat (facultatif)', with: '2') expect(page).to have_no_css('label', text: 'permis de conduire', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true) @@ -461,11 +461,11 @@ describe 'The user' do click_on 'Accéder à votre dossier' click_on 'Modifier mon dossier' - expect(page).to have_css('label', text: 'age', visible: true) + expect(page).to have_css('label', text: 'age du candidat', visible: true) expect(page).to have_no_css('label', text: 'permis de conduire', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true) - fill_in('age (facultatif)', with: '18') + fill_in('age du candidat (facultatif)', with: '18') wait_for_autosave(false) # the champ keeps their previous value so they are all displayed