correctif(spec): mise a jour des brouillons_spec.rb pour adapter l'integration des checkbox au DSFR

This commit is contained in:
Martin 2023-08-14 15:20:27 +02:00
parent 370d8a8cf1
commit 6aec12f02f

View file

@ -432,17 +432,17 @@ describe 'The user' do
fill_individual fill_individual
expect(page).to have_css('label', text: 'age du candidat', 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', 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('legend', text: 'info voiture', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age du candidat (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', text: 'permis de conduire', visible: true)
expect(page).to have_css('legend h2', text: 'info voiture', visible: true) expect(page).to have_css('legend', text: 'info voiture', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
choose('Oui') page.find('label', text: 'Oui').click
expect(page).to have_css('label', text: 'permis de conduire', visible: true) expect(page).to have_css('legend', text: 'permis de conduire', visible: true)
expect(page).to have_css('label', text: 'tonnage', visible: true) expect(page).to have_css('label', text: 'tonnage', visible: true)
fill_in('tonnage', with: '1') fill_in('tonnage', with: '1')
@ -453,7 +453,7 @@ describe 'The user' do
expect(page).to have_no_css('label', text: 'parking', visible: true) expect(page).to have_no_css('label', text: 'parking', visible: true)
fill_in('age du candidat (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('legend', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
click_on 'Déposer le dossier' click_on 'Déposer le dossier'
@ -461,14 +461,14 @@ describe 'The user' do
click_on 'Modifier mon dossier' click_on 'Modifier mon dossier'
expect(page).to have_css('label', text: 'age du candidat', 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', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age du candidat (facultatif)', with: '18') fill_in('age du candidat (facultatif)', with: '18')
wait_for_autosave wait_for_autosave
# the champ keeps their previous value so they are all displayed # the champ keeps their previous value so they are all displayed
expect(page).to have_css('label', text: 'permis de conduire', visible: true) expect(page).to have_css('legend', text: 'permis de conduire', visible: true)
expect(page).to have_css('label', text: 'tonnage', visible: true) expect(page).to have_css('label', text: 'tonnage', visible: true)
end end
end end