correction du test sur l'état de l'input

This commit is contained in:
Benoit Queyron 2024-07-12 11:36:43 +02:00
parent 88710969bb
commit 2a955a0f8c
No known key found for this signature in database
GPG key ID: 9E723480C7317E22

View file

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