Fix group investments filters links
They were pointing to the budget page instead of the budget group page, which made navigation weird.
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<small>
|
<small>
|
||||||
<%= link_to t("budgets.groups.show.unfeasible"),
|
<%= link_to t("budgets.groups.show.unfeasible"),
|
||||||
budget_path(@budget, filter: "unfeasible") %>
|
budget_group_path(@budget, @group, filter: "unfeasible") %>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<small>
|
<small>
|
||||||
<%= link_to t("budgets.groups.show.unselected"),
|
<%= link_to t("budgets.groups.show.unselected"),
|
||||||
budget_path(@budget, filter: "unselected") %>
|
budget_group_path(@budget, @group, filter: "unselected") %>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -49,5 +49,24 @@ describe "Budget Groups" do
|
|||||||
|
|
||||||
expect(first_heading.name).to appear_before(last_heading.name)
|
expect(first_heading.name).to appear_before(last_heading.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "Links to investment filters", :js do
|
||||||
|
create(:budget_heading, group: group, name: "Southwest")
|
||||||
|
budget.update!(phase: "finished")
|
||||||
|
|
||||||
|
visit budget_group_path(budget, group)
|
||||||
|
|
||||||
|
click_link "See unfeasible investments"
|
||||||
|
|
||||||
|
expect(page).to have_css "h3", exact_text: "Unfeasible investments"
|
||||||
|
expect(page).to have_link "Southwest"
|
||||||
|
expect(page).not_to have_link "See unfeasible investments"
|
||||||
|
|
||||||
|
click_link "See investments not selected for balloting phase"
|
||||||
|
|
||||||
|
expect(page).to have_css "h3", exact_text: "Investments not selected for balloting phase"
|
||||||
|
expect(page).to have_link "Southwest"
|
||||||
|
expect(page).not_to have_link "See investments not selected for balloting phase unfeasible investments"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1325,10 +1325,7 @@ describe "Budget Investments" do
|
|||||||
expect(page).to have_css("#budget_heading_#{heading_1.id}.is-active")
|
expect(page).to have_css("#budget_heading_#{heading_1.id}.is-active")
|
||||||
expect(page).to have_css("#budget_heading_#{heading_2.id}")
|
expect(page).to have_css("#budget_heading_#{heading_2.id}")
|
||||||
|
|
||||||
visit budget_group_path(budget, group)
|
|
||||||
|
|
||||||
click_link "See unfeasible investments"
|
click_link "See unfeasible investments"
|
||||||
click_link "Health"
|
|
||||||
|
|
||||||
within("#headings") do
|
within("#headings") do
|
||||||
expect(page).to have_css("#budget_heading_#{heading_1.id}")
|
expect(page).to have_css("#budget_heading_#{heading_1.id}")
|
||||||
|
|||||||
Reference in New Issue
Block a user