spec
This commit is contained in:
parent
4bddb4dde9
commit
6b5f38ce74
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue