diff --git a/app/helpers/proposals_helper.rb b/app/helpers/proposals_helper.rb
index 3ce853dfa..9abbb198c 100644
--- a/app/helpers/proposals_helper.rb
+++ b/app/helpers/proposals_helper.rb
@@ -102,4 +102,8 @@ module ProposalsHelper
def show_proposal_votes?
params[:selected].blank?
end
+
+ def show_featured_proposals?
+ params[:selected].blank? && @featured_proposals.present?
+ end
end
diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb
index ababd571f..33be571fd 100644
--- a/app/views/proposals/index.html.erb
+++ b/app/views/proposals/index.html.erb
@@ -58,7 +58,7 @@
<%= render "shared/banner" %>
<% end %>
- <% if @featured_proposals.present? %>
+ <% if show_featured_proposals? %>
diff --git a/spec/features/proposals_spec.rb b/spec/features/proposals_spec.rb
index 744d4bf76..98e825dfe 100644
--- a/spec/features/proposals_spec.rb
+++ b/spec/features/proposals_spec.rb
@@ -962,6 +962,21 @@ feature "Proposals" do
within("aside") { expect(page).not_to have_content "SUPPORTS" }
within("aside") { expect(page).to have_content "Selected proposal" }
end
+
+ scenario "do not show featured proposal in selected proposals list" do
+ Setting["feature.featured_proposals"] = true
+ create_featured_proposals
+
+ visit proposals_path
+
+ expect(page).to have_selector("#proposals .proposal-featured")
+ expect(page).to have_selector("#featured-proposals")
+
+ click_link "Selected proposals"
+
+ expect(page).not_to have_selector("#proposals .proposal-featured")
+ expect(page).not_to have_selector("#featured-proposals")
+ end
end
context "Search" do