This commit is contained in:
shamoon
2025-12-30 14:10:30 -08:00
parent 9c8c1b8fa8
commit 42da64826f
2 changed files with 13 additions and 5 deletions

View File

@@ -76,6 +76,18 @@ describe('ShareLinkBundleDialogComponent', () => {
}) })
expect(component.buttonsEnabled).toBe(false) expect(component.buttonsEnabled).toBe(false)
expect(confirmSpy).toHaveBeenCalled() 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', () => { it('ignores submit when bundle already created', () => {

View File

@@ -925,14 +925,10 @@ export class BulkEditorComponent
dialog.confirmClicked dialog.confirmClicked
.pipe(takeUntil(this.unsubscribeNotifier)) .pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => { .subscribe(() => {
const payload = dialog.payload
if (!payload) {
return
}
dialog.loading = true dialog.loading = true
dialog.buttonsEnabled = false dialog.buttonsEnabled = false
this.shareLinkBundleService this.shareLinkBundleService
.createBundle(payload) .createBundle(dialog.payload)
.pipe(first()) .pipe(first())
.subscribe({ .subscribe({
next: (result) => { next: (result) => {