fix(expiration_banner.message): miss match when procedure was not expirable ; always showing expiration message
This commit is contained in:
parent
ea28555376
commit
f84b69276e
4 changed files with 22 additions and 6 deletions
|
@ -23,9 +23,7 @@
|
|||
= button_to repousser_expiration_instructeur_dossier_path(dossier.procedure, dossier), class: 'button mt-2', id: 'test-instructeur-repousser-expiration' do
|
||||
%span.icon.standby
|
||||
= t('instructeurs.dossiers.header.banner.button_delay_expiration')
|
||||
|
||||
|
||||
- else
|
||||
- elsif dossier.en_instruction? && dossier.procedure.procedure_expires_when_termine_enabled
|
||||
%p.expires_at_en_instruction
|
||||
%small= t("shared.dossiers.header.expires_at.en_instruction")
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
= button_to users_dossier_repousser_expiration_path(dossier), class: 'button mt-2', id: 'test-user-repousser-expiration' do
|
||||
%span.icon.standby
|
||||
= t('users.dossiers.header.banner.button_delay_expiration', duree_conservation_dossiers_dans_ds: dossier.procedure.duree_conservation_dossiers_dans_ds)
|
||||
|
||||
|
||||
- else
|
||||
- elsif dossier.en_instruction? && dossier.procedure.procedure_expires_when_termine_enabled
|
||||
%p.expires_at_en_instruction
|
||||
%small= t("shared.dossiers.header.expires_at.en_instruction")
|
||||
|
||||
|
|
|
@ -23,6 +23,16 @@ describe 'instructeur/dossiers/expiration_banner.html.haml', type: :view do
|
|||
it 'render estimated expiration date' do
|
||||
expect(subject).not_to have_selector('.expires_at')
|
||||
end
|
||||
|
||||
context 'with dossier.en_instruction?' do
|
||||
let(:state) { :en_instruction }
|
||||
let(:attributes) { {} }
|
||||
|
||||
it 'does not render estimated expiration date' do
|
||||
expect(subject).not_to have_selector('p.expires_at_en_instruction',
|
||||
text: I18n.t("shared.dossiers.header.expires_at.en_instruction"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with procedure having procedure_expires_when_termine_enabled enabled' do
|
||||
|
|
|
@ -24,6 +24,16 @@ describe 'users/dossiers/expiration_banner.html.haml', type: :view do
|
|||
it 'render estimated expiration date' do
|
||||
expect(subject).not_to have_selector('.expires_at')
|
||||
end
|
||||
|
||||
context 'with dossier.en_instruction?' do
|
||||
let(:state) { :en_instruction }
|
||||
let(:attributes) { {} }
|
||||
|
||||
it 'does not render estimated expiration date' do
|
||||
expect(subject).not_to have_selector('p.expires_at_en_instruction',
|
||||
text: I18n.t("shared.dossiers.header.expires_at.en_instruction"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with procedure having procedure_expires_when_termine_enabled enabled' do
|
||||
|
|
Loading…
Reference in a new issue