Fix "go back" link in budget group and investments
Even if we usually only access these pages for the current budget, that might not always be the case, and now that we've unified budget landing pages, there's no point in them pointing to the index anymore.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="budget-header">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= back_link_to budgets_path %>
|
||||
<%= back_link_to budget_path(@budget) %>
|
||||
<h2><%= t("budgets.groups.show.title") %></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to budgets_path %>
|
||||
<%= back_link_to budget_path(@budget) %>
|
||||
|
||||
<% if can? :show, @ballot %>
|
||||
<%= link_to t("budgets.investments.header.check_ballot"),
|
||||
|
||||
@@ -68,5 +68,13 @@ describe "Budget Groups" do
|
||||
expect(page).to have_link "Southwest"
|
||||
expect(page).not_to have_link "See investments not selected for balloting phase unfeasible investments"
|
||||
end
|
||||
|
||||
scenario "Back link", :js do
|
||||
visit budget_group_path(budget, group)
|
||||
|
||||
click_link "Go back"
|
||||
|
||||
expect(page).to have_current_path budget_path(budget)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -88,6 +88,10 @@ describe "Budget Investments" do
|
||||
expect(page).not_to have_content(unfeasible_investment.title)
|
||||
end
|
||||
end
|
||||
|
||||
click_link "Go back"
|
||||
|
||||
expect(page).to have_current_path budget_path(budget)
|
||||
end
|
||||
|
||||
scenario "Index view mode" do
|
||||
|
||||
Reference in New Issue
Block a user