Merge pull request #7422 from betagouv/fix-patron-page

Technique : correction d'une exception sur la page /patron
This commit is contained in:
Pierre de La Morinerie 2022-05-31 15:16:20 +02:00 committed by GitHub
commit d0723b684b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -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)

View file

@ -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