feat(Procedure::Cards::IneligibleDossier): add an ineligibilite dossier card to procedure dashboard

This commit is contained in:
mfo 2024-06-05 17:08:00 +02:00
parent 810d272be2
commit 12d23f1498
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
8 changed files with 77 additions and 1 deletions

View file

@ -0,0 +1,25 @@
describe Procedure::Card::IneligibiliteDossierComponent, type: :component do
describe 'render' do
subject do
render_inline(described_class.new(procedure: procedure))
end
context 'when none of types_de_champ_public supports conditional' do
let(:procedure) { create(:procedure, types_de_champ_public: []) }
it 'render missing setup' do
subject
expect(page).to have_text('Champs manquant')
end
end
context 'when at least one of types_de_champ_public support conditional' do
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :yes_no }]) }
it 'render the template' do
subject
expect(page).to have_text('À configurer')
end
end
end
end