correction du test sur l'état de l'input
This commit is contained in:
parent
88710969bb
commit
2a955a0f8c
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue