diff --git a/app/views/users/dossiers/_dossiers_list.html.haml b/app/views/users/dossiers/_dossiers_list.html.haml index 663d8e33b..da58f4be2 100644 --- a/app/views/users/dossiers/_dossiers_list.html.haml +++ b/app/views/users/dossiers/_dossiers_list.html.haml @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 4a7264a67..d3570abaf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 257b9d9d5..a6e214613 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -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: diff --git a/spec/system/users/list_dossiers_spec.rb b/spec/system/users/list_dossiers_spec.rb index dd514b931..67372dd6b 100644 --- a/spec/system/users/list_dossiers_spec.rb +++ b/spec/system/users/list_dossiers_spec.rb @@ -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