diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts index 8c2171ff7..da4d93c6a 100644 --- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts @@ -76,6 +76,18 @@ describe('ShareLinkBundleDialogComponent', () => { }) expect(component.buttonsEnabled).toBe(false) expect(confirmSpy).toHaveBeenCalled() + + component.form.setValue({ + shareArchiveVersion: true, + expirationDays: 7, + }) + component.submit() + + expect(component.payload).toEqual({ + document_ids: [1, 2], + file_version: FileVersion.Archive, + expiration_days: 7, + }) }) it('ignores submit when bundle already created', () => { diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts index 0c58c7d84..2b4782e96 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -925,14 +925,10 @@ export class BulkEditorComponent dialog.confirmClicked .pipe(takeUntil(this.unsubscribeNotifier)) .subscribe(() => { - const payload = dialog.payload - if (!payload) { - return - } dialog.loading = true dialog.buttonsEnabled = false this.shareLinkBundleService - .createBundle(payload) + .createBundle(dialog.payload) .pipe(first()) .subscribe({ next: (result) => {