Replace default feature proposals to nil

This commit is contained in:
decabeza
2019-03-13 13:18:53 +01:00
parent 528a4b6e8e
commit e520a51d57
3 changed files with 6 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ section "Creating Settings" do
Setting.create(key: "feature.debates", value: "true") Setting.create(key: "feature.debates", value: "true")
Setting.create(key: "feature.proposals", value: "true") Setting.create(key: "feature.proposals", value: "true")
Setting.create(key: "feature.featured_proposals", value: "true") Setting.create(key: "feature.featured_proposals", value: nil)
Setting.create(key: "feature.polls", value: "true") Setting.create(key: "feature.polls", value: "true")
Setting.create(key: "feature.spending_proposals", value: nil) Setting.create(key: "feature.spending_proposals", value: nil)
Setting.create(key: "feature.spending_proposal_features.voting_allowed", value: nil) Setting.create(key: "feature.spending_proposal_features.voting_allowed", value: nil)

View File

@@ -66,7 +66,6 @@ Setting["meta_keywords"] = nil
# Feature flags # Feature flags
Setting['feature.debates'] = true Setting['feature.debates'] = true
Setting['feature.proposals'] = true Setting['feature.proposals'] = true
Setting['feature.featured_proposals'] = true
Setting['feature.spending_proposals'] = nil Setting['feature.spending_proposals'] = nil
Setting['feature.polls'] = true Setting['feature.polls'] = true
Setting['feature.twitter_login'] = true Setting['feature.twitter_login'] = true
@@ -84,6 +83,7 @@ Setting['feature.map'] = nil
Setting['feature.allow_images'] = true Setting['feature.allow_images'] = true
Setting['feature.allow_attached_documents'] = true Setting['feature.allow_attached_documents'] = true
Setting['feature.help_page'] = true Setting['feature.help_page'] = true
Setting["feature.featured_proposals"] = nil
# Spending proposals feature flags # Spending proposals feature flags
Setting['feature.spending_proposal_features.voting_allowed'] = nil Setting['feature.spending_proposal_features.voting_allowed'] = nil

View File

@@ -521,6 +521,7 @@ feature "Proposals" do
end end
scenario "Index do not list retired proposals by default" do scenario "Index do not list retired proposals by default" do
Setting["feature.featured_proposals"] = true
create_featured_proposals create_featured_proposals
not_retired = create(:proposal) not_retired = create(:proposal)
retired = create(:proposal, retired_at: Time.current) retired = create(:proposal, retired_at: Time.current)
@@ -881,8 +882,10 @@ feature "Proposals" do
end end
scenario "do not show in featured proposals section" do scenario "do not show in featured proposals section" do
Setting["feature.featured_proposals"] = true
featured_proposal = create(:proposal, :with_confidence_score, cached_votes_up: 100) featured_proposal = create(:proposal, :with_confidence_score, cached_votes_up: 100)
archived_proposal = create(:proposal, :archived, :with_confidence_score, cached_votes_up: 10000) archived_proposal = create(:proposal, :archived, :with_confidence_score,
cached_votes_up: 10000)
visit proposals_path visit proposals_path