mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-17 11:21:29 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3021c36a5 | ||
|
|
54b450d69f | ||
|
|
371d6041fa | ||
|
|
0f063a0155 | ||
|
|
73834aa49f |
No files matched your search
@@ -186,7 +186,9 @@ export class AppFrameComponent
|
||||
)
|
||||
.subscribe((result) => {
|
||||
this.documentList.reload(null, false)
|
||||
this.documentList.reduceSelectionToFilter()
|
||||
if (!this.documentList.allSelected) {
|
||||
this.documentList.reduceSelectionToFilter()
|
||||
}
|
||||
// maybe someday we can optimize to only refresh affected documents
|
||||
this.openDocumentsService.getOpenDocuments().forEach((doc) => {
|
||||
this.openDocumentsService.refreshDocument(doc.id)
|
||||
|
||||
@@ -718,7 +718,6 @@ describe('BulkEditorComponent', () => {
|
||||
'Workflow will run on the selected documents in the background.'
|
||||
)
|
||||
expect(toast.mock.calls.at(-1)[0].actionName).toBeUndefined()
|
||||
expect(documentListViewService.selected.size).toBe(0)
|
||||
httpTestingController.match(
|
||||
`${environment.apiBaseUrl}documents/?page=1&page_size=50&ordering=-created&truncate_content=true&include_selection_data=true`
|
||||
) // list reload
|
||||
@@ -1283,6 +1282,7 @@ describe('BulkEditorComponent', () => {
|
||||
) // listAllFilteredIds
|
||||
|
||||
component.showConfirmationDialogs = false
|
||||
documentListViewService.collectionSize = 2
|
||||
fixture.detectChanges()
|
||||
jest
|
||||
.spyOn(documentListViewService, 'allSelected', 'get')
|
||||
@@ -1293,7 +1293,7 @@ describe('BulkEditorComponent', () => {
|
||||
)
|
||||
req.flush({ result: 'OK', task_id: 'delete-2' })
|
||||
// ids aren't known when all matching documents are selected, so no undo
|
||||
expect(trackSpy).toHaveBeenLastCalledWith('delete-2', 0, null)
|
||||
expect(trackSpy).toHaveBeenLastCalledWith("delete-2", 2, null)
|
||||
httpTestingController.match(
|
||||
`${environment.apiBaseUrl}documents/?page=1&page_size=50&ordering=-created&truncate_content=true&include_selection_data=true`
|
||||
) // list reload
|
||||
@@ -1492,7 +1492,6 @@ describe('BulkEditorComponent', () => {
|
||||
httpTestingController.match(
|
||||
`${environment.apiBaseUrl}documents/?page=1&page_size=100000&fields=id`
|
||||
) // listAllFilteredIds
|
||||
expect(documentListViewService.selected.size).toEqual(0)
|
||||
|
||||
// Test with archiveFallback enabled
|
||||
modal.componentInstance.deleteOriginals.set(false)
|
||||
@@ -1514,7 +1513,6 @@ describe('BulkEditorComponent', () => {
|
||||
httpTestingController.match(
|
||||
`${environment.apiBaseUrl}documents/?page=1&page_size=100000&fields=id`
|
||||
) // listAllFilteredIds
|
||||
expect(documentListViewService.selected.size).toEqual(0)
|
||||
})
|
||||
|
||||
it('should support merging documents as versions', () => {
|
||||
@@ -1562,7 +1560,6 @@ describe('BulkEditorComponent', () => {
|
||||
httpTestingController.match(
|
||||
`${environment.apiBaseUrl}documents/?page=1&page_size=100000&fields=id`
|
||||
)
|
||||
expect(documentListViewService.selected.size).toEqual(0)
|
||||
jest.advanceTimersByTime(400)
|
||||
expect(toastSpy).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
@@ -1717,7 +1714,6 @@ describe('BulkEditorComponent', () => {
|
||||
expect(notification.actionName).toBeUndefined()
|
||||
}
|
||||
expect(reload).not.toHaveBeenCalled()
|
||||
expect(documentListViewService.selected.size).toBe(0)
|
||||
expect(documentListViewService.allSelected).toBe(false)
|
||||
TestBed.inject(TaskNotificationService).complete({
|
||||
task_id: 'queued-operation',
|
||||
|
||||
@@ -329,7 +329,6 @@ export class BulkEditorComponent
|
||||
.subscribe({
|
||||
next: () => {
|
||||
modal.close()
|
||||
this.list.selectNone()
|
||||
this.toastService.showInfo(
|
||||
$localize`Workflow will run on the selected documents in the background.`
|
||||
)
|
||||
@@ -366,7 +365,6 @@ export class BulkEditorComponent
|
||||
) {
|
||||
const bulk = this.getSelectionSize() > 1
|
||||
modal?.close()
|
||||
this.list.selectNone()
|
||||
if (onQueued) {
|
||||
onQueued(taskId)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user