Skip to content

Commit

Permalink
amelioration(design): ETQ usager la cohabitation du design d'un form …
Browse files Browse the repository at this point in the history
…mi-DSFR, mi-DS n'est pas trop moche

amelioration(design): ETQ usager la cohabitation du design d'un form mi-DSFR, mi-DS n'est pas trop moche
  • Loading branch information
Martin authored and mfo committed Jul 11, 2023
1 parent e624c83 commit e17a133
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions app/assets/stylesheets/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,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;
Expand All @@ -206,7 +206,6 @@
input[type=password],
select {
display: block;
margin-bottom: $default-fields-spacer;
margin-bottom: 0;

&.small-margin {
Expand Down
12 changes: 6 additions & 6 deletions spec/system/users/brouillon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
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 },
Expand All @@ -432,12 +432,12 @@

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)
Expand All @@ -453,19 +453,19 @@
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)

click_on 'Déposer le dossier'
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
Expand Down

0 comments on commit e17a133

Please sign in to comment.