Skip to content

Commit

Permalink
Backport 'Fix empty address in conference's venues ' to v0.27 (#11910)
Browse files Browse the repository at this point in the history
* Fix empty address in conference's venues

* Fix Empty address in venues sometimes

* Run linters

* Add specs for venues

* Fix selector on spec for this version of decidim

---------

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
  • Loading branch information
andreslucena and alecslupu committed Nov 6, 2023
1 parent 1b5e186 commit 7286e1e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions decidim-conferences/spec/system/conferences_spec.rb
Expand Up @@ -237,6 +237,21 @@
expect(page).to have_no_css(".statistic__number", text: "3")
end
end

context "when the conference has multiple meetings components" do
let!(:meetings_component) { create(:component, :published, participatory_space: conference, manifest_name: :meetings) }
let!(:other_meetings_component) { create(:component, :published, participatory_space: conference, manifest_name: :meetings) }

it "show meeting venues" do
create(:meeting, :published, :online, address: "", location_hints: nil, location: "", component: meetings_component)
create(:meeting, :published, :in_person, address: "", location_hints: nil, location: "", component: other_meetings_component)
create_list(:meeting, 3, :published, :in_person, component: meetings_component)

visit decidim_conferences.conference_path(conference)

expect(page).to have_css("#venues .mb-s", count: 3)
end
end
end
end
end
Expand Up @@ -5,8 +5,11 @@
<div class="row">
<div class="column medium-4">
<% meetings.each do |meeting_block| %>
<% next if meeting_block.first.empty? %>
<% meeting_block.last.each_with_index do |meeting, index| %>
<% next if index != 0 %>
<%== cell("decidim/conferences/conference_address", meeting) %>
<% end %>
<% end %>
Expand Down

0 comments on commit 7286e1e

Please sign in to comment.