views: display revision errors on the procedure dashboard
This commit is contained in:
parent
52b0fbf9b7
commit
9db62178d2
4 changed files with 48 additions and 6 deletions
|
@ -50,5 +50,23 @@ describe 'Creating a new procedure', js: true do
|
|||
expect(page).to have_field('libelle de champ')
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'a warning is displayed when creating an invalid procedure' do
|
||||
visit champs_admin_procedure_path(procedure)
|
||||
|
||||
# Add an empty repetition type de champ
|
||||
add_champ(remove_flash_message: true)
|
||||
select('Bloc répétable', from: 'champ-0-type_champ')
|
||||
fill_in 'champ-0-libelle', with: 'libellé de champ'
|
||||
blur
|
||||
expect(page).to have_content('Formulaire enregistré')
|
||||
|
||||
click_link procedure.libelle
|
||||
expect(page).to have_current_path(admin_procedure_path(procedure))
|
||||
|
||||
champs_card = find('.card-admin', text: 'Champs du formulaire')
|
||||
expect(champs_card).to have_selector('.icon.refuse')
|
||||
expect(champs_card).to have_content('À modifier')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue