From 3a1614f96dd7846e992fbbdaf8228e175059a931 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 10 May 2023 10:29:23 +0200 Subject: [PATCH] try fix upload pj spec --- spec/system/users/en_construction_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/system/users/en_construction_spec.rb b/spec/system/users/en_construction_spec.rb index 51d3ded7c..9840a84bd 100644 --- a/spec/system/users/en_construction_spec.rb +++ b/spec/system/users/en_construction_spec.rb @@ -17,6 +17,7 @@ describe "Dossier en_construction" do expect(page).not_to have_button("Remplacer") click_on "Supprimer le fichier toto.txt" + wait_until { champ.reload.for_export.blank? } expect(page).not_to have_text("toto.txt") end @@ -34,6 +35,7 @@ describe "Dossier en_construction" do expect(page).to have_selector(input_selector) find(input_selector).attach_file(Rails.root.join('spec/fixtures/files/file.pdf')) + wait_until { champ.reload.for_export == 'file.pdf' } expect(page).to have_text("file.pdf") expect(page).not_to have_text("toto.txt") end