This commit is contained in:
simon lehericey 2022-08-11 14:00:45 +02:00
parent 4bddb4dde9
commit 6b5f38ce74

View file

@ -14,6 +14,16 @@ describe 'As an administrateur I can edit types de champ', js: true do
expect(page).to have_content('Formulaire enregistré')
end
scenario "adding a piece justificative template" do
add_champ
select('Pièce justificative', from: 'Type de champ')
find('.attachment input[type=file]').attach_file(Rails.root + 'spec/fixtures/files/file.pdf')
# Expect the files to be uploaded immediately
expect(page).to have_text('file.pdf')
end
scenario "adding multiple champs" do
# Champs are created when clicking the 'Add field' button
add_champs(count: 3)