test(brouillon_spec): remove unecessary manual sleep, improve "brouillon" feedback testing

This commit is contained in:
Colin Darie 2022-08-03 16:02:22 +02:00
parent 81a9258c8a
commit e8b088c2c5
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -43,8 +43,8 @@ describe 'The user' do
fill_in('dossier_link', with: dossier_to_link.id)
find('.editable-champ-piece_justificative input[type=file]').attach_file(Rails.root + 'spec/fixtures/files/file.pdf')
expect(page).to have_css('span', text: 'Votre brouillon est automatiquement enregistré', visible: true)
blur
sleep(0.7)
expect(page).to have_css('span', text: 'Brouillon enregistré', visible: true)
# check data on the dossier