Merge pull request #10603 from demarches-simplifiees/bug-input-pj-apres-suppression

ETQ Admin (bug), je veux pouvoir modifier des PJ sans recharger la page
This commit is contained in:
Colin Darie 2024-07-30 12:14:11 +00:00 committed by GitHub
commit 90e6c8a6f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 41 additions and 23 deletions

View file

@ -23,7 +23,7 @@ RSpec.describe Attachment::EditComponent, type: :component do
let(:attachment) { nil }
it 'renders a form field for uploading a file' do
expect(subject).to have_selector('input[type=file]:not(.hidden)')
expect(subject).to have_selector('input[type=file]:not([disabled])')
end
it 'renders max size' do
@ -40,8 +40,8 @@ RSpec.describe Attachment::EditComponent, type: :component do
expect(subject).to have_content(attachment.filename.to_s)
end
it 'hides the file field by default' do
expect(subject).to have_selector('input[type=file].hidden')
it 'disabled the file field by default' do
expect(subject).to have_selector('input[type=file][disabled]')
end
it 'shows the Delete button by default' do