Reenable 'winners' tab under Admin::Budget::Investment

This commit is contained in:
Angel Perez
2018-01-19 09:45:02 -04:00
parent a79e60ecd1
commit 1027896617
5 changed files with 11 additions and 8 deletions

View File

@@ -3,7 +3,8 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
include FeatureFlags include FeatureFlags
feature_flag :budgets 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]) only: [:index, :toggle_selection])
before_action :load_budget before_action :load_budget

View File

@@ -148,6 +148,7 @@ en:
undecided: Undecided undecided: Undecided
unfeasible: Unfeasible unfeasible: Unfeasible
max_per_heading: Max. supports per heading max_per_heading: Max. supports per heading
winners: Winners
button: Filter button: Filter
download_current_selection: "Download current selection" download_current_selection: "Download current selection"
no_budget_investments: "There are no investment projects." no_budget_investments: "There are no investment projects."

View File

@@ -148,6 +148,7 @@ es:
undecided: Sin decidir undecided: Sin decidir
unfeasible: Inviables unfeasible: Inviables
max_per_heading: Corte por partida max_per_heading: Corte por partida
winners: Ganadores
button: Filtrar button: Filtrar
download_current_selection: "Descargar selección actual" download_current_selection: "Descargar selección actual"
no_budget_investments: "No hay proyectos de gasto." no_budget_investments: "No hay proyectos de gasto."

View File

@@ -646,12 +646,12 @@ feature 'Admin budget investments' do
expect(page).to have_content(selected_bi.title) expect(page).to have_content(selected_bi.title)
expect(page).to have_content(winner_bi.title) expect(page).to have_content(winner_bi.title)
# within('#filter-subnav') { click_link 'Winners' } within('#filter-subnav') { click_link 'Winners' }
# expect(page).not_to have_content(unfeasible_bi.title) 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_bi.title)
# expect(page).not_to have_content(feasible_vf_bi.title) expect(page).not_to have_content(feasible_vf_bi.title)
# expect(page).not_to have_content(selected_bi.title) expect(page).not_to have_content(selected_bi.title)
# expect(page).to have_content(winner_bi.title) expect(page).to have_content(winner_bi.title)
end end
scenario "Showing the selection buttons", :js do scenario "Showing the selection buttons", :js do

View File

@@ -177,7 +177,7 @@ feature 'Admin budgets' do
context "Calculate Budget's Winner Investments" 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') budget = create(:budget, phase: 'reviewing_ballots')
group = create(:budget_group, budget: budget) group = create(:budget_group, budget: budget)
heading = create(:budget_heading, group: group, price: 4) heading = create(:budget_heading, group: group, price: 4)