Merge pull request #2370 from consul/improve_budget_heading_style
Improve budget heading style
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
<% else %>
|
||||
<tr>
|
||||
<th><%= t("admin.budgets.form.table_heading") %></th>
|
||||
<th><%= t("admin.budgets.form.table_amount") %></th>
|
||||
<th><%= t("admin.budgets.form.table_population") %></th>
|
||||
<th class="text-right"><%= t("admin.budgets.form.table_amount") %></th>
|
||||
<th class="text-right"><%= t("admin.budgets.form.table_population") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<td>
|
||||
<%= heading.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= heading.price %>
|
||||
<td class="text-right">
|
||||
<%= heading.budget.formatted_heading_price(heading) %>
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-right">
|
||||
<%= heading.population %>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -191,16 +191,19 @@ feature 'Admin budgets' do
|
||||
budget = create(:budget, phase: 'reviewing_ballots')
|
||||
group = create(:budget_group, budget: budget)
|
||||
heading = create(:budget_heading, group: group, price: 4)
|
||||
unselected_investment = create(:budget_investment, :unselected, heading: heading, price: 1, ballot_lines_count: 3)
|
||||
winner_investment = create(:budget_investment, :winner, heading: heading, price: 3, ballot_lines_count: 2)
|
||||
selected_investment = create(:budget_investment, :selected, heading: heading, price: 2, ballot_lines_count: 1)
|
||||
unselected = create(:budget_investment, :unselected, heading: heading, price: 1,
|
||||
ballot_lines_count: 3)
|
||||
winner = create(:budget_investment, :winner, heading: heading, price: 3,
|
||||
ballot_lines_count: 2)
|
||||
selected = create(:budget_investment, :selected, heading: heading, price: 2,
|
||||
ballot_lines_count: 1)
|
||||
|
||||
visit edit_admin_budget_path(budget)
|
||||
click_link 'Calculate Winner Investments'
|
||||
expect(page).to have_content 'Winners being calculated, it may take a minute.'
|
||||
expect(page).to have_content winner_investment.title
|
||||
expect(page).not_to have_content unselected_investment.title
|
||||
expect(page).not_to have_content selected_investment.title
|
||||
expect(page).to have_content winner.title
|
||||
expect(page).not_to have_content unselected.title
|
||||
expect(page).not_to have_content selected.title
|
||||
end
|
||||
|
||||
scenario 'For a finished Budget' do
|
||||
@@ -270,7 +273,7 @@ feature 'Admin budgets' do
|
||||
expect(page).not_to have_content 'This group has no assigned heading.'
|
||||
|
||||
expect(page).to have_content 'District 9 reconstruction'
|
||||
expect(page).to have_content '6785'
|
||||
expect(page).to have_content '€6,785'
|
||||
expect(page).to have_content '100500'
|
||||
end
|
||||
end
|
||||
@@ -293,7 +296,7 @@ feature 'Admin budgets' do
|
||||
end
|
||||
|
||||
expect(page).to have_content 'District 2'
|
||||
expect(page).to have_content '10000'
|
||||
expect(page).to have_content '€10,000'
|
||||
expect(page).to have_content '6000'
|
||||
end
|
||||
|
||||
|
||||
@@ -1226,13 +1226,13 @@ feature 'Budget Investments' do
|
||||
|
||||
within("#budget_group_#{global_group.id}") do
|
||||
expect(page).to have_content sp1.title
|
||||
expect(page).to have_content sp1.price
|
||||
expect(page).to have_content "€#{sp1.price}"
|
||||
|
||||
expect(page).to have_content sp2.title
|
||||
expect(page).to have_content sp2.price
|
||||
expect(page).to have_content "€#{sp2.price}"
|
||||
|
||||
expect(page).not_to have_content sp3.title
|
||||
expect(page).not_to have_content sp3.price
|
||||
expect(page).not_to have_content "#{sp3.price}"
|
||||
end
|
||||
|
||||
within("#budget_group_#{group.id}") do
|
||||
|
||||
Reference in New Issue
Block a user