mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-17 09:24:55 +00:00
Chorehancement: update to Angular v22, 'zoneless' / 'reactive' (#13114)
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@
|
||||
|
||||
<ng-template #queryAtom let-atom="atom">
|
||||
<div class="input-group input-group-sm">
|
||||
<ng-select
|
||||
<ng-select #fieldSelects
|
||||
class="paperless-input-select"
|
||||
[items]="customFields"
|
||||
[(ngModel)]="atom.field"
|
||||
|
||||
+4
-10
@@ -1,11 +1,6 @@
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing'
|
||||
import {
|
||||
ComponentFixture,
|
||||
fakeAsync,
|
||||
TestBed,
|
||||
tick,
|
||||
} from '@angular/core/testing'
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
||||
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { NgSelectModule } from '@ng-select/ng-select'
|
||||
@@ -210,14 +205,13 @@ describe('CustomFieldsQueryDropdownComponent', () => {
|
||||
expect(component.name).toBe('test_title')
|
||||
})
|
||||
|
||||
it('should add a default atom on open and focus the select field', fakeAsync(() => {
|
||||
it('should add a default atom on open', async () => {
|
||||
expect(component.selectionModel.queries.length).toBe(0)
|
||||
component.onOpenChange(true)
|
||||
fixture.detectChanges()
|
||||
tick()
|
||||
await fixture.whenStable()
|
||||
expect(component.selectionModel.queries.length).toBe(1)
|
||||
expect(window.document.activeElement.tagName).toBe('INPUT')
|
||||
}))
|
||||
})
|
||||
|
||||
describe('CustomFieldQueriesModel', () => {
|
||||
let model: CustomFieldQueriesModel
|
||||
|
||||
Reference in New Issue
Block a user