try fix upload pj spec

This commit is contained in:
simon lehericey 2023-05-10 10:29:23 +02:00
parent a45d5f6d05
commit 3a1614f96d

View file

@ -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