Skip to content

Commit

Permalink
fix conference specs
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Oct 9, 2024
1 parent b3f3376 commit 83e84c4
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 42 deletions.
4 changes: 3 additions & 1 deletion app/forms/concerns/answer_questionnaire_override.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module AnswerQuestionnaireOverride
def call
return broadcast(:invalid) if @form.invalid? || user_already_answered?

answer_questionnaire
with_events do
answer_questionnaire
end

if @errors
reset_form_attachments
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- replace 'erb[silent]:contains("if current_participatory_space.registrations_enabled?")' -->

<% if external_conference_registration %>
<%= render "decidim/conferences/external_register_button" %>
<% elsif current_participatory_space.registrations_enabled? %>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- replace '.column.medium-9.medium-centered > erb[silent]:contains("if current_participatory_space.registrations_enabled?")' -->
<!-- replace '.conference__content-block erb[silent]:contains("if current_participatory_space.registrations_enabled?")' -->

<% if external_conference_registration %>
<div class="column medium-6">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<!-- replace '.columns.mediumlarge-12 > erb[silent]:contains("if current_participatory_space.registrations_enabled?")' -->
<!-- replace 'erb[loud]:contains(":conference_venues") + erb[silent]:contains("if current_participatory_space.registrations_enabled?")' -->

<% if external_conference_registration %>
<hr class="reset mt-none mb-m">
<section class="section">
<h3 class="section-heading"><%= t(".register") %></h3>
<div class="card p-m text-center">
<p><%= t(".make_conference_registration") %></p>
<div class="medium-3" style="margin: 0 auto;">
<%= render "decidim/conferences/external_register_button" %>
</div>
</div>
</div>
<section class="content-block">
<h2 class="h2 decorator"><%= t("decidim.conferences.conferences.show.register") %></h2>
<p class="conference__box-title"><%= t("decidim.conferences.conferences.show.make_conference_registration") %></p>

<%= render "decidim/conferences/external_register_button" %>
</section>
<% elsif current_participatory_space.registrations_enabled? %>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= link_to t("layouts.decidim.conference_hero.register"), external_conference_registration, target: "_blank", class:"button button--sc light expanded" %>
<%= link_to t("layouts.decidim.conference_hero.register"), external_conference_registration, target: "_blank", class:"button button__lg button__secondary" %>
30 changes: 15 additions & 15 deletions spec/lib/overrides_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,33 @@
# "/app/views/decidim/assemblies/assemblies/show.html.erb" => "eeabef769e29b59de98af16d3549dcab"
# }
# },
# {
# package: "decidim-conferences",
# files: {
# "/app/views/decidim/conferences/conferences/show.html.erb" => "94e3fb8ee4e092678ce0f229c87e1bc0",
# "/app/views/layouts/decidim/_conference_hero.html.erb" => "db2e565169a5ce7f8a3e7d03dd0ebfd9"
# }
# },
{
package: "decidim-conferences",
files: {
"/app/views/decidim/conferences/conferences/_conference_hero.html.erb" => "da4e86d29cf4272356d4bed6130d641f",
"/app/views/decidim/conferences/conferences/show.html.erb" => "eb94f807d798fe1ed4d1404dd1dfcad9"
}
},
# {
# package: "decidim-participatory_processes",
# files: {
# "/app/views/decidim/participatory_processes/participatory_processes/show.html.erb" => "747ee665f0c08484436f320865df62cc"
# }
# },
# {
# package: "decidim-forms",
# files: {
# "/app/commands/decidim/forms/answer_questionnaire.rb" => "c53587b220467c2d6889f657ac2404a0"
# }
# },
{
package: "decidim-forms",
files: {
"/app/commands/decidim/forms/answer_questionnaire.rb" => "04911ecd2621f959f512b34e4dd9ab3f"
}
},
{
package: "decidim-proposals",
files: {
"/app/controllers/decidim/proposals/proposals_controller.rb" => "5ec87417fc0231203fc39b02ebab82f0",
"/app/helpers/decidim/proposals/application_helper.rb" => "317b0347528e697fa405a792bcfa3db8"
"/app/helpers/decidim/proposals/application_helper.rb" => "317b0347528e697fa405a792bcfa3db8",
# "/app/views/decidim/proposals/proposals/index.html.erb" => "48fbf7a8332f5f4c026b793e7922bdbc",
# "/app/views/decidim/proposals/proposals/show.html.erb" => "23188e6a12cc1ac6ce44c857b3b81a4c",
# "/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb" => "b8a9a1b573b2f888b293d10a7fab6577",
"/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb" => "99565100beee10448dac976d6d5e8b87",
# "/app/views/decidim/proposals/proposals/_proposals.html.erb" => "a4057670154210aff98e5f206d0fdfc2",
# "/app/views/decidim/proposals/proposals/_wizard_aside.html.erb" => "45dc17085fabc549bee6474b8a3e79df",
}
Expand Down
1 change: 1 addition & 0 deletions spec/system/conference_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
describe "Visit a conference" do
let(:organization) { create(:organization) }
let(:conference) { create(:conference, slug:, registrations_enabled:, organization:) }
let!(:registration_type) { create(:registration_type, conference:) }
let(:registrations_enabled) { true }
let(:slug) { "my-conference" }
let(:conference_env) { "CONFERENCE_#{slug.gsub("-", "_").upcase}_REGISTRATION" }
Expand Down

0 comments on commit 83e84c4

Please sign in to comment.