From fcb11e49e1744813b5c80a01b27d42349126b068 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 26 Apr 2023 16:49:50 +0200 Subject: [PATCH] spec: fix flaky test --- spec/system/users/brouillon_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index 91bf885f8..f8d1b8f6e 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -40,6 +40,9 @@ describe 'The user' do fill_in('Renseignez le code postal puis sélectionnez la commune dans la liste', with: '60400') select('Brétigny (60400)', from: form_id_for('communes')) + # communes needs more time to be updated + wait_until { champ_value_for('communes') == "Brétigny" } + fill_in('dossier_link', with: '123') find('.editable-champ-piece_justificative input[type=file]').attach_file(Rails.root + 'spec/fixtures/files/file.pdf')