Skip to content

Commit

Permalink
Fix conference view to allow images from admin and spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
HHassig committed Aug 6, 2024
1 parent 391a091 commit 470ddac
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/decidim/conferences/conferences/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ edit_link(
<div class="columns mediumlarge-12">
<section class="section">
<h3 class="section-heading"><%= t("conferences.show.introduction", scope: "decidim") %></h3>
<%= decidim_sanitize translated_attribute(current_participatory_space.short_description) %>
<%= decidim_sanitize_editor_admin translated_attribute(current_participatory_space.short_description) %>
</section>
<hr class="reset mt-none mb-m">
<section class="section">
<h3 class="section-heading"><%= t("conferences.show.details", scope: "decidim") %></h3>
<%= decidim_sanitize translated_attribute(current_participatory_space.description) %>
<%= decidim_sanitize_editor_admin translated_attribute(current_participatory_space.description) %>
<div class="row mt-l mb-l">
<div class="column medium-9 medium-centered">
<% if current_participatory_space.registrations_enabled? %>
Expand Down
20 changes: 20 additions & 0 deletions spec/system/conferences_with_image_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

require "rails_helper"

describe "conference with images", type: :system do
let!(:organization) { create :organization }
let!(:conference) { create :conference, organization: organization, slug: slug, registrations_enabled: true }
let(:slug) { "bla-bla" }
let(:user) { create(:user, :confirmed, organization: organization) }

before do
visit_component
page.execute_script("$('#dc-modal-accept').click()")
visit Decidim::ResourceLocatorPresenter.new(post).path
end

it "shows the image" do
expect(page).to have_selector('img src=')
end
end

0 comments on commit 470ddac

Please sign in to comment.