Fix investments link in single heading budgets

The link to "See all investments" didn't have the `heading_id`
parameter, which resulted in the ballot information not being displayed
when in the voting phase.

We could modify the link to include the `heading_id` parameter, but IMHO
it's more robust to select the heading automatically when there's only
one heading. That way manually accessing the page without a `heading_id`
parameter will still work as if the heading had been selected.
This commit is contained in:
Javi Martín
2021-09-17 00:55:37 +02:00
parent f669b476f8
commit caebaac1cc
2 changed files with 6 additions and 0 deletions

View File

@@ -1356,6 +1356,9 @@ describe "Budget Investments" do
expect(page).to have_content investment2.title
expect(page).to have_content "€20,000"
end
expect(page).to have_link "Submit my ballot"
expect(page).to have_content "STILL AVAILABLE TO YOU €666,666"
end
scenario "Order by cost (only when balloting)" do