diff --git a/decidim-meetings/app/cells/decidim/meetings/dates_and_map/show.erb b/decidim-meetings/app/cells/decidim/meetings/dates_and_map/show.erb index 4262f9a2db99..a4a7cd78f71e 100644 --- a/decidim-meetings/app/cells/decidim/meetings/dates_and_map/show.erb +++ b/decidim-meetings/app/cells/decidim/meetings/dates_and_map/show.erb @@ -15,9 +15,11 @@ - <%= static_map %> - - <% if online? %> + <% if display_map? %> + <%= static_map %> + <% elsif online? %> <%= cell("decidim/address", meeting, online: true) %> + <% else %> + <%= cell("decidim/address", meeting) %> <% end %> diff --git a/decidim-meetings/app/cells/decidim/meetings/dates_and_map_cell.rb b/decidim-meetings/app/cells/decidim/meetings/dates_and_map_cell.rb index 245f8a919615..65e96c342aa8 100644 --- a/decidim-meetings/app/cells/decidim/meetings/dates_and_map_cell.rb +++ b/decidim-meetings/app/cells/decidim/meetings/dates_and_map_cell.rb @@ -14,7 +14,7 @@ class DatesAndMapCell < Decidim::ViewModel delegate :snippets, to: :controller def static_map - return render :static_map if display_map? + return render :static_map end def year diff --git a/decidim-meetings/spec/system/meeting_spec.rb b/decidim-meetings/spec/system/meeting_spec.rb index bd289b978d38..1171522c2869 100644 --- a/decidim-meetings/spec/system/meeting_spec.rb +++ b/decidim-meetings/spec/system/meeting_spec.rb @@ -107,10 +107,11 @@ def visit_meeting context "and meeting is in_person" do let(:meeting) { create(:meeting, :published, :with_services, component:) } - it "hides the map section" do + it "hides the map section but displays address" do visit_meeting expect(page).to have_no_css("div.meeting__calendar-container .static-map") + expect(page).to have_css("div.meeting__calendar-container .address__container") end end