views: refactor the attachment/edit view

Make it more reusable, by:

- Renaming `attachment/update` to `attachment/edit`
- Refactoring the CSS styles into their own stylesheet
- Allow to specify the 'accept' option
This commit is contained in:
Pierre de La Morinerie 2019-10-22 08:58:04 +00:00
parent 5be83bd01e
commit 1c61f2de58
12 changed files with 66 additions and 57 deletions

View file

@ -108,7 +108,7 @@ feature 'Inviting an expert:' do
expect(page).to have_text('Cet avis est confidentiel')
fill_in 'avis_answer', with: 'Ma réponse dexpert : cest un oui.'
find('.piece-justificative input[type=file]').attach_file(Rails.root + 'spec/fixtures/files/RIB.pdf')
find('.attachment input[type=file]').attach_file(Rails.root + 'spec/fixtures/files/RIB.pdf')
click_on 'Envoyer votre avis'
expect(page).to have_content('Votre réponse est enregistrée')