a champ is mandatory when visible with a mandatory tdc

This commit is contained in:
simon lehericey 2022-08-08 17:17:52 +02:00
parent ec40836589
commit 898badb579
5 changed files with 20 additions and 5 deletions

View file

@ -292,6 +292,18 @@ describe 'The user' do
click_on 'Déposer le dossier'
expect(page).to have_current_path(merci_dossier_path(user_dossier))
end
scenario 'cannot submit a reveal dossier with a revealed mandatory champ ', js: true do
log_in(user, procedure)
fill_individual
fill_in('age', with: '18')
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))
end
end
context 'with a visibilite in cascade' do