Merge pull request #10667 from colinux/fix-dossier-expire-download
ETQ usager : correctif pour télécharger un dossier expiré
This commit is contained in:
commit
a41f03ef92
2 changed files with 9 additions and 1 deletions
|
@ -536,7 +536,7 @@ module Users
|
||||||
Dossier.visible_by_user.or(Dossier.for_procedure_preview).or(Dossier.for_editing_fork)
|
Dossier.visible_by_user.or(Dossier.for_procedure_preview).or(Dossier.for_editing_fork)
|
||||||
elsif action_name == 'restore'
|
elsif action_name == 'restore'
|
||||||
Dossier.hidden_by_user
|
Dossier.hidden_by_user
|
||||||
elsif action_name == 'extend_conservation_and_restore'
|
elsif action_name == 'extend_conservation_and_restore' || (action_name == 'show' && request.format.pdf?)
|
||||||
Dossier.visible_by_user.or(Dossier.hidden_by_expired)
|
Dossier.visible_by_user.or(Dossier.hidden_by_expired)
|
||||||
else
|
else
|
||||||
Dossier.visible_by_user
|
Dossier.visible_by_user
|
||||||
|
|
|
@ -246,6 +246,14 @@ describe 'user access to the list of their dossiers', js: true do
|
||||||
expect(page).to have_content('2 supprimés récemment')
|
expect(page).to have_content('2 supprimés récemment')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when user download PDF of expired' do
|
||||||
|
scenario "generate PDF" do
|
||||||
|
click_on "3 supprimés récemment"
|
||||||
|
click_on 'Télécharger mon dossier', match: :first
|
||||||
|
# Test fails when an error happens during PDF generation
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "user search bar" do
|
describe "user search bar" do
|
||||||
|
|
Loading…
Reference in a new issue