diff --git a/app/controllers/admin/budget_investments_controller.rb b/app/controllers/admin/budget_investments_controller.rb index 2ad59159c..8c45d7c9c 100644 --- a/app/controllers/admin/budget_investments_controller.rb +++ b/app/controllers/admin/budget_investments_controller.rb @@ -3,7 +3,8 @@ class Admin::BudgetInvestmentsController < Admin::BaseController include FeatureFlags feature_flag :budgets - has_filters(%w{all without_admin without_valuator under_valuation valuation_finished}, + has_filters(%w{all without_admin without_valuator under_valuation + valuation_finished winners}, only: [:index, :toggle_selection]) before_action :load_budget diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 295037867..059cfaa9e 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -148,6 +148,7 @@ en: undecided: Undecided unfeasible: Unfeasible max_per_heading: Max. supports per heading + winners: Winners button: Filter download_current_selection: "Download current selection" no_budget_investments: "There are no investment projects." diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 4948943d2..741cc7197 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -148,6 +148,7 @@ es: undecided: Sin decidir unfeasible: Inviables max_per_heading: Corte por partida + winners: Ganadores button: Filtrar download_current_selection: "Descargar selección actual" no_budget_investments: "No hay proyectos de gasto." diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 86336b02c..05e3f905d 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -646,12 +646,12 @@ feature 'Admin budget investments' do expect(page).to have_content(selected_bi.title) expect(page).to have_content(winner_bi.title) - # within('#filter-subnav') { click_link 'Winners' } - # expect(page).not_to have_content(unfeasible_bi.title) - # expect(page).not_to have_content(feasible_bi.title) - # expect(page).not_to have_content(feasible_vf_bi.title) - # expect(page).not_to have_content(selected_bi.title) - # expect(page).to have_content(winner_bi.title) + within('#filter-subnav') { click_link 'Winners' } + expect(page).not_to have_content(unfeasible_bi.title) + expect(page).not_to have_content(feasible_bi.title) + expect(page).not_to have_content(feasible_vf_bi.title) + expect(page).not_to have_content(selected_bi.title) + expect(page).to have_content(winner_bi.title) end scenario "Showing the selection buttons", :js do diff --git a/spec/features/admin/budgets_spec.rb b/spec/features/admin/budgets_spec.rb index 07915e999..7da02b559 100644 --- a/spec/features/admin/budgets_spec.rb +++ b/spec/features/admin/budgets_spec.rb @@ -177,7 +177,7 @@ feature 'Admin budgets' do context "Calculate Budget's Winner Investments" do - xscenario 'For a Budget in reviewing balloting' do + scenario 'For a Budget in reviewing balloting' do budget = create(:budget, phase: 'reviewing_ballots') group = create(:budget_group, budget: budget) heading = create(:budget_heading, group: group, price: 4)