mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-03 14:50:31 +00:00
Chorehancement: update to Angular v22, 'zoneless' / 'reactive' (#13114)
This commit is contained in:
@@ -730,7 +730,9 @@ describe('DocumentListComponent', () => {
|
||||
showInSideBar: true,
|
||||
})
|
||||
expect(updateVisibilitySpy).not.toHaveBeenCalled()
|
||||
expect(openModal.componentInstance.error).toEqual({ filter_rules: ['11'] })
|
||||
expect(openModal.componentInstance.error()).toEqual({
|
||||
filter_rules: ['11'],
|
||||
})
|
||||
})
|
||||
|
||||
it('should detect saved view changes', () => {
|
||||
@@ -777,7 +779,7 @@ describe('DocumentListComponent', () => {
|
||||
})
|
||||
|
||||
it('should hide columns if no perms or notes disabled', () => {
|
||||
jest.spyOn(permissionService, 'currentUserCan').mockReturnValue(true)
|
||||
permissionService.initialize([], { is_superuser: true } as any)
|
||||
jest.spyOn(documentListService, 'documents', 'get').mockReturnValue(docs)
|
||||
expect(documentListService.sortField).toEqual('created')
|
||||
|
||||
@@ -798,7 +800,7 @@ describe('DocumentListComponent', () => {
|
||||
).toHaveLength(9)
|
||||
|
||||
// insufficient perms
|
||||
jest.spyOn(permissionService, 'currentUserCan').mockReturnValue(false)
|
||||
permissionService.initialize([], { is_superuser: false } as any)
|
||||
fixture.detectChanges()
|
||||
expect(
|
||||
fixture.debugElement.queryAll(By.directive(SortableDirective))
|
||||
@@ -837,11 +839,10 @@ describe('DocumentListComponent', () => {
|
||||
|
||||
it('should get custom field title', () => {
|
||||
fixture.detectChanges()
|
||||
jest
|
||||
.spyOn(settingsService, 'allDisplayFields', 'get')
|
||||
.mockReturnValue([
|
||||
{ id: 'custom_field_1' as any, name: 'Custom Field 1' },
|
||||
])
|
||||
const mockDisplayFields = [
|
||||
{ id: 'custom_field_1' as any, name: 'Custom Field 1' },
|
||||
]
|
||||
settingsService.allDisplayFields = jest.fn(() => mockDisplayFields) as any
|
||||
expect(component.getDisplayCustomFieldTitle('custom_field_1')).toEqual(
|
||||
'Custom Field 1'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user