Enhancement: notifications improvements (#14500)

This commit is contained in:
shamoon authored and GitHub committed 2026-10-19 19:18:39 -07:00
1 parent c657fceea5
commit 98fb7c3b63
77 files changed
+1535 -627

No files matched your search

@@ -33,7 +33,9 @@ describe('DocumentVersionDropdownComponent', () => {
| 'updateVersionLabel'
>
>
let toastService: jest.Mocked<Pick<ToastService, 'showError' | 'showInfo'>>
let toastService: jest.Mocked<
Pick<ToastService, 'showError' | 'showInfo' | 'showSuccess'>
>
let finished$: Subject<{ taskId: string }>
let failed$: Subject<{ taskId: string; message?: string }>
let modalService: jest.Mocked<Pick<NgbModal, 'open'>>
@@ -55,6 +57,7 @@ describe('DocumentVersionDropdownComponent', () => {
toastService = {
showError: jest.fn(),
showInfo: jest.fn(),
showSuccess: jest.fn(),
}
permissionsService = {
currentUserCan: jest.fn().mockReturnValue(true),
@@ -416,6 +419,6 @@ describe('DocumentVersionDropdownComponent', () => {
expect(selectedEmitSpy).toHaveBeenCalledWith(2)
expect(component.newVersionLabel).toEqual('')
expect(modal.close).toHaveBeenCalled()
expect(toastService.showInfo).toHaveBeenCalled()
expect(toastService.showSuccess).toHaveBeenCalled()
})
})
@@ -320,7 +320,7 @@ export class DocumentVersionDropdownComponent
}
this.newVersionLabel = ''
modal.close()
this.toastService.showInfo(
this.toastService.showSuccess(
$localize`Existing document added as a version.`
)
},