Chorehancement: update to Angular v22, 'zoneless' / 'reactive' (#13114)

This commit is contained in:
shamoon
2026-07-10 00:42:16 -07:00
committed by GitHub
parent f244442c65
commit 106b41a15c
213 changed files with 5363 additions and 5842 deletions
@@ -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'
)