Enhancment: Formatted filename for single document downloads (#12095)

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Jan Kleine
2026-02-26 18:06:47 +00:00
committed by GitHub
co-authored by shamoon
parent 5e1202a416
commit c86ebc0260
7 changed files with 107 additions and 18 deletions
@@ -1813,7 +1813,13 @@ describe('DocumentDetailComponent', () => {
component.selectedVersionId = 10
component.download()
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(1, doc.id, false, null)
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(
1,
doc.id,
false,
null,
false
)
httpTestingController
.expectOne('download-latest')
.error(new ProgressEvent('failed'))
@@ -1826,7 +1832,13 @@ describe('DocumentDetailComponent', () => {
component.selectedVersionId = doc.id
component.download()
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(3, doc.id, false, doc.id)
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(
3,
doc.id,
false,
doc.id,
false
)
httpTestingController
.expectOne('download-non-latest')
.error(new ProgressEvent('failed'))
@@ -1849,7 +1861,13 @@ describe('DocumentDetailComponent', () => {
.mockReturnValueOnce('print-no-version')
component.download()
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(1, doc.id, false, null)
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(
1,
doc.id,
false,
null,
false
)
httpTestingController
.expectOne('download-no-version')
.error(new ProgressEvent('failed'))