Fix duplicate HTML IDs in investments selection
Since this cell is shown once per row, there were multiple rows with the same HTML ID on the page.
This commit is contained in:
@@ -54,7 +54,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td id="selection" data-field="selected">
|
<td data-field="selected">
|
||||||
<% if investment.selected? %>
|
<% if investment.selected? %>
|
||||||
<%= link_to_if can?(:toggle_selection, investment),
|
<%= link_to_if can?(:toggle_selection, investment),
|
||||||
t("admin.budget_investments.index.selected"),
|
t("admin.budget_investments.index.selected"),
|
||||||
|
|||||||
@@ -1451,22 +1451,22 @@ describe "Admin budget investments", :admin do
|
|||||||
|
|
||||||
visit admin_budget_budget_investments_path(budget)
|
visit admin_budget_budget_investments_path(budget)
|
||||||
|
|
||||||
within("#budget_investment_#{unfeasible_bi.id} #selection") do
|
within("#budget_investment_#{unfeasible_bi.id} [data-field=selected]") do
|
||||||
expect(page).not_to have_content("Select")
|
expect(page).not_to have_content("Select")
|
||||||
expect(page).not_to have_content("Selected")
|
expect(page).not_to have_content("Selected")
|
||||||
end
|
end
|
||||||
|
|
||||||
within("#budget_investment_#{feasible_bi.id} #selection") do
|
within("#budget_investment_#{feasible_bi.id} [data-field=selected]") do
|
||||||
expect(page).not_to have_content("Select")
|
expect(page).not_to have_content("Select")
|
||||||
expect(page).not_to have_content("Selected")
|
expect(page).not_to have_content("Selected")
|
||||||
end
|
end
|
||||||
|
|
||||||
within("#budget_investment_#{feasible_vf_bi.id} #selection") do
|
within("#budget_investment_#{feasible_vf_bi.id} [data-field=selected]") do
|
||||||
expect(page).not_to have_content("Select")
|
expect(page).not_to have_content("Select")
|
||||||
expect(page).not_to have_content("Selected")
|
expect(page).not_to have_content("Selected")
|
||||||
end
|
end
|
||||||
|
|
||||||
within("#budget_investment_#{selected_bi.id} #selection") do
|
within("#budget_investment_#{selected_bi.id} [data-field=selected]") do
|
||||||
expect(page).not_to contain_exactly("Select")
|
expect(page).not_to contain_exactly("Select")
|
||||||
expect(page).to have_content("Selected")
|
expect(page).to have_content("Selected")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user