diff --git a/app/helpers/proposals_helper.rb b/app/helpers/proposals_helper.rb index 9f0b36815..3ce853dfa 100644 --- a/app/helpers/proposals_helper.rb +++ b/app/helpers/proposals_helper.rb @@ -83,8 +83,8 @@ module ProposalsHelper link_to button_text, path, remote: true, method: :patch, class: html_class end - def css_for_proposal_info_row - if feature?(:allow_images) + def css_for_proposal_info_row(proposal) + if proposal.image.present? if params[:selected].present? "small-12 medium-9 column" else diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb index bad37f0ee..496f0f4a1 100644 --- a/app/views/proposals/_proposal.html.erb +++ b/app/views/proposals/_proposal.html.erb @@ -12,10 +12,10 @@ alt: proposal.image.title.unicode_normalize %> -
- <%= t("proposals.proposal.successful") %> -
+<%= t('.draft') %>
- <%= t("proposals.proposal.successful") %> -
+diff --git a/spec/features/proposal_ballots_spec.rb b/spec/features/proposal_ballots_spec.rb index d67585a7c..5a8f12db6 100644 --- a/spec/features/proposal_ballots_spec.rb +++ b/spec/features/proposal_ballots_spec.rb @@ -9,8 +9,8 @@ feature "Proposal ballots" do visit proposals_path successful_proposals.each do |proposal| - within("#proposal_#{proposal.id}_votes") do - expect(page).to have_content "This proposal has reached the required supports" + within("#proposal_#{proposal.id}_votes .supports .progress") do + expect(page).to have_content "100% / 100%" end end end @@ -20,8 +20,8 @@ feature "Proposal ballots" do successful_proposals.each do |proposal| visit proposal_path(proposal) - within("#proposal_#{proposal.id}_votes") do - expect(page).to have_content "This proposal has reached the required supports" + within("#proposal_#{proposal.id}_votes .supports .progress") do + expect(page).to have_content "100% / 100%" end end end diff --git a/spec/features/proposals_spec.rb b/spec/features/proposals_spec.rb index 2e58a60c2..3861680a4 100644 --- a/spec/features/proposals_spec.rb +++ b/spec/features/proposals_spec.rb @@ -1773,8 +1773,8 @@ feature "Successful proposals" do successful_proposals.each do |proposal| within("#proposal_#{proposal.id}_votes") do - expect(page).not_to have_css(".supports") - expect(page).to have_content "This proposal has reached the required supports" + expect(page).not_to have_link "Support" + expect(page).to have_content "100% / 100%" end end end @@ -1785,8 +1785,8 @@ feature "Successful proposals" do successful_proposals.each do |proposal| visit proposal_path(proposal) within("#proposal_#{proposal.id}_votes") do - expect(page).not_to have_css(".supports") - expect(page).to have_content "This proposal has reached the required supports" + expect(page).not_to have_link "Support" + expect(page).to have_content "100% / 100%" end end end