mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-31 13:58:04 -06:00
Coverage
This commit is contained in:
@@ -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', () => {
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user