This commit is contained in:
Lisa Durand 2024-08-20 14:58:00 +02:00
parent 686000d6cb
commit 16864cc868
No known key found for this signature in database
GPG key ID: 0DF91F2CA1E8B816
4 changed files with 9 additions and 13 deletions

View file

@ -43,11 +43,7 @@
= t('views.users.dossiers.dossiers_list.n_dossier')
= number_with_html_delimiter(dossier.id)
- if @statut == "dossiers-supprimes"
%span.fr-badge.fr-badge--sm.fr-badge--warning
= t('views.users.dossiers.dossiers_list.deleted_badge')
- else
= status_badge_user(dossier, 'fr-mb-1w')
= status_badge_user(dossier, 'fr-mb-1w')
- if dossier.pending_correction?
%br

View file

@ -513,7 +513,8 @@ en:
created_at: Created at %{date}
updated_at: updated at %{date}
shared_with: File shared by %{owner} with
deleted: Deleted at %{date}
deleted_by_user: Deleted on %{date} by user
deleted_by_automatic: Deleted on %{date} automatically due to expiration date
procedure_closed:
brouillon:
internal_procedure_html: This procedure is closed. You cannot submit this file. We invite you to submit a new one on the %{link} which replaces it.

View file

@ -533,7 +533,6 @@ fr:
created_at: Créé le %{date}
updated_at: modifié le %{date}
shared_with: Dossier partagé par %{owner} avec
deleted: Supprimé le %{date}
deleted_by_user: Supprimé le %{date} par l'usager
deleted_by_automatic: Supprimé le %{date} automatiquement du à la date d'expiration
dossier_action:

View file

@ -219,7 +219,7 @@ describe 'user access to the list of their dossiers', js: true do
describe 'restore' do
it 'should have links to restore dossiers' do
click_on "3 supprimés récemment"
click_on "3 supprimés"
expect(page).to have_link('Restaurer', href: restore_dossier_path(dossier_en_construction_supprime))
expect(page).to have_button('Restaurer et étendre la conservation')
expect(page).to have_link('Télécharger mon dossier', href: dossier_path("#{dossier_traite_expire.id}.pdf"))
@ -227,29 +227,29 @@ describe 'user access to the list of their dossiers', js: true do
context 'when user clicks on restore button', js: true do
scenario 'the dossier is restored' do
click_on "3 supprimés récemment"
click_on "3 supprimés"
expect(page).to have_content(dossier_en_construction_supprime.procedure.libelle)
click_on 'Restaurer'
expect(page).to have_content('Votre dossier a bien été restauré')
expect(page).to have_content('2 supprimés récemment')
expect(page).to have_content('2 supprimés')
end
end
context 'when user clicks on restore and extend button', js: true do
scenario 'the dossier is restored and extended' do
click_on "3 supprimés récemment"
click_on "3 supprimés"
expect(page).to have_content(dossier_en_construction_expire.procedure.libelle)
click_on 'Restaurer et étendre la conservation'
expect(page).to have_content('Votre dossier sera conservé 3 mois supplémentaire')
expect(page).to have_content('2 supprimés récemment')
expect(page).to have_content('2 supprimés')
end
end
context 'when user download PDF of expired' do
scenario "generate PDF" do
click_on "3 supprimés récemment"
click_on "3 supprimés"
click_on 'Télécharger mon dossier', match: :first
# Test fails when an error happens during PDF generation
end