From a04749c3efaa6658b20df2901ec1fe29915b4f94 Mon Sep 17 00:00:00 2001
From: Eric Leroy-Terquem <eric.leroyterquem@beta.gouv.fr>
Date: Mon, 22 Jul 2024 16:29:20 +0200
Subject: [PATCH]  fix a flaky test

---
 spec/system/users/brouillon_spec.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb
index d1c3e9b71..39ac071cb 100644
--- a/spec/system/users/brouillon_spec.rb
+++ b/spec/system/users/brouillon_spec.rb
@@ -674,7 +674,8 @@ describe 'The user' do
 
   def champ_for(libelle)
     champs = user_dossier.reload.champs_public
-    champs.find { |c| c.libelle == libelle }
+    champ = champs.find { |c| c.libelle == libelle }
+    champ.reload
   end
 
   def fill_individual