From 2a955a0f8c6a4d511b2e7801e2c2aae89203f517 Mon Sep 17 00:00:00 2001 From: Benoit Queyron <72251526+Benoit-MINT@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:36:43 +0200 Subject: [PATCH] =?UTF-8?q?correction=20du=20test=20sur=20l'=C3=A9tat=20de?= =?UTF-8?q?=20l'input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/components/attachment/edit_component_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/components/attachment/edit_component_spec.rb b/spec/components/attachment/edit_component_spec.rb index c9298f9ff..027abacfa 100644 --- a/spec/components/attachment/edit_component_spec.rb +++ b/spec/components/attachment/edit_component_spec.rb @@ -20,7 +20,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 @@ -37,8 +37,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