From ef4bc6a650bdcc3abdab15ad1ae293d124abb40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 8 Nov 2024 13:35:22 +0100 Subject: [PATCH] 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. --- spec/system/valuation/budget_investments_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/valuation/budget_investments_spec.rb b/spec/system/valuation/budget_investments_spec.rb index 3d542abb1..7b0727730 100644 --- a/spec/system/valuation/budget_investments_spec.rb +++ b/spec/system/valuation/budget_investments_spec.rb @@ -410,7 +410,7 @@ describe "Valuation budget investments" do visit valuation_budget_budget_investment_path(budget, investment) click_link "Edit dossier" - accept_confirm { find_field("budget_investment[valuation_finished]").click } + accept_confirm { check "Valuation finished" } click_button "Save changes" expect(page).to have_content "Dossier updated"