feat(Procedure::Cards::IneligibleDossier): add an ineligibilite dossier card to procedure dashboard
This commit is contained in:
parent
810d272be2
commit
12d23f1498
8 changed files with 77 additions and 1 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue