diff --git a/app/helpers/champ_helper.rb b/app/helpers/champ_helper.rb index d2fc3d4ee..aa8094207 100644 --- a/app/helpers/champ_helper.rb +++ b/app/helpers/champ_helper.rb @@ -28,7 +28,7 @@ module ChampHelper def autosave_available?(champ) # FIXME: enable autosave on champs private? once we figured out how to batch audit events - champ.dossier.brouillon? && !champ.repetition? + champ.dossier&.brouillon? && !champ.repetition? end def geo_area_label(geo_area) diff --git a/spec/system/patron_spec.rb b/spec/system/patron_spec.rb new file mode 100644 index 000000000..ba472ddfe --- /dev/null +++ b/spec/system/patron_spec.rb @@ -0,0 +1,8 @@ +describe 'Accessing the /patron page:' do + scenario 'I can display a page with all form fields and UI elements' do + visit patron_path + expect(page).to have_text('IcĂ´nes') + expect(page).to have_text('Formulaires') + expect(page).to have_text('Boutons') + end +end