Simplify accept_confirm dialog in valuation test

We were using `check "Valuation finished"` everywhere except here.

This way it's easier to realize, while reading the test, that we're
interacting with a checkbox and not a link or a button.
This commit is contained in:
Javi Martín
2024-11-08 13:35:22 +01:00
parent 87a5dd8ee5
commit ef4bc6a650

View File

@@ -410,7 +410,7 @@ describe "Valuation budget investments" do
visit valuation_budget_budget_investment_path(budget, investment) visit valuation_budget_budget_investment_path(budget, investment)
click_link "Edit dossier" click_link "Edit dossier"
accept_confirm { find_field("budget_investment[valuation_finished]").click } accept_confirm { check "Valuation finished" }
click_button "Save changes" click_button "Save changes"
expect(page).to have_content "Dossier updated" expect(page).to have_content "Dossier updated"