From 2cb5d8724769037af0ce5f07b2dbe366f36dbd67 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 14 Nov 2026 00:14:29 -0800 Subject: [PATCH] We have to make this generic-er --- .../app/components/app-frame/app-frame.component.spec.ts | 9 ++++++--- .../src/app/components/app-frame/app-frame.component.ts | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts index 9d78858122..80da6375e3 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts @@ -231,7 +231,7 @@ describe('AppFrameComponent', () => { expect(refresh).toHaveBeenCalledWith(document.id) expect(maybeRefreshSpy).toHaveBeenCalledTimes(1) expect(tasksReload).toHaveBeenCalledTimes(1) - expect(success).toHaveBeenCalledWith('Bulk operation completed.') + expect(success).toHaveBeenCalledWith('Operation completed.') fixture.destroy() bulkEvents.next({ task_id: 'bulk-task', @@ -263,9 +263,12 @@ describe('AppFrameComponent', () => { }) } expect(reload).toHaveBeenCalledTimes(2) - expect(error).toHaveBeenCalledWith(expect.any(String), 'Could not update') expect(error).toHaveBeenCalledWith( - 'Bulk operation revoked.', + 'Operation failed. Some changes may already have been applied.', + 'Could not update' + ) + expect(error).toHaveBeenCalledWith( + 'Operation revoked.', 'Task expired before execution.' ) expect(success).not.toHaveBeenCalled() diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts index 52f10df01c..abb454afe9 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.ts @@ -204,12 +204,12 @@ export class AppFrameComponent this.trashService.handleDeleteTaskStatus(task_id, status) } if (status === PaperlessTaskStatus.Success && operation !== 'delete') { - this.toastService.showSuccess($localize`Bulk operation completed.`) + this.toastService.showSuccess($localize`Operation completed.`) } else if (status === PaperlessTaskStatus.Revoked) { - this.toastService.showError($localize`Bulk operation revoked.`, error) + this.toastService.showError($localize`Operation revoked.`, error) } else if (status === PaperlessTaskStatus.Failure) { this.toastService.showError( - $localize`Bulk operation failed. Some changes may already have been applied.`, + $localize`Operation failed. Some changes may already have been applied.`, error ) }