From ab31087f23e031bf19f028ec671c4f923c22aa98 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 6 Jul 2021 11:27:27 +0200 Subject: [PATCH] Hide cadastres if there is none --- app/views/shared/champs/carte/_geo_areas.html.haml | 2 +- spec/features/new_administrateur/types_de_champ_spec.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/shared/champs/carte/_geo_areas.html.haml b/app/views/shared/champs/carte/_geo_areas.html.haml index 80418dd84..1bc1ae898 100644 --- a/app/views/shared/champs/carte/_geo_areas.html.haml +++ b/app/views/shared/champs/carte/_geo_areas.html.haml @@ -5,7 +5,7 @@ - champ.selections_utilisateur.each do |geo_area| = render partial: 'shared/champs/carte/geo_area', locals: { geo_area: geo_area, editing: editing } -- if champ.cadastres? +- if champ.cadastres.present? .areas-title Parcelles cadastrales .areas %ul diff --git a/spec/features/new_administrateur/types_de_champ_spec.rb b/spec/features/new_administrateur/types_de_champ_spec.rb index 30fe31433..d265b6454 100644 --- a/spec/features/new_administrateur/types_de_champ_spec.rb +++ b/spec/features/new_administrateur/types_de_champ_spec.rb @@ -122,7 +122,6 @@ feature 'As an administrateur I can edit types de champ', js: true do preview_window = window_opened_by { click_on 'Prévisualiser le formulaire' } within_window(preview_window) do expect(page).to have_content('Libellé de champ carte') - expect(page).to have_content('Parcelles cadastrales') end end