
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, main has been updated via 35e28a6189e36247db19863040098e5e8ae1113d (commit) from f5cf06306f0ea3c567439bac002fbf35c56c1ea2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 35e28a6189e36247db19863040098e5e8ae1113d Author: Jane Sandberg <sandbergja@gmail.com> Date: Mon May 26 09:34:32 2025 -0700 LP204349 follow-up: allow org-select to display This is the same fix as 414311f495446438f5d259fb72b4ad22dfe92d96, but for the org unit select. Signed-off-by: Jane Sandberg <sandbergja@gmail.com> diff --git a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.spec.ts b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.spec.ts new file mode 100644 index 0000000000..b5ce950b75 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.spec.ts @@ -0,0 +1,27 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { OrgSelectComponent } from './org-select.component'; +import { AuthService } from '@eg/core/auth.service'; +import { MockGenerators } from 'test_data/mock_generators'; +import { ServerStoreService } from '@eg/core/server-store.service'; +import { OrgService } from '@eg/core/org.service'; + +describe('OrgSelectComponent', () => { + let fixture: ComponentFixture<OrgSelectComponent>; + beforeEach(() => { + const root = MockGenerators.idlObject({id: '1', shortname: 'LINN', ou_type: MockGenerators.idlObject({depth: 1})}); + const mockOrg = jasmine.createSpyObj<OrgService>(['list', 'sortTree', 'absorbTree']); + mockOrg.list.and.returnValue([root]); + TestBed.configureTestingModule({ + providers: [ + {provide: AuthService, useValue: MockGenerators.authService()}, + {provide: ServerStoreService, useValue: MockGenerators.serverStoreService(false)}, + {provide: OrgService, useValue: mockOrg} + ], + }); + fixture = TestBed.createComponent(OrgSelectComponent); + fixture.detectChanges(); + }); + it('can create without error', () => { + expect(fixture.componentInstance).toBeTruthy(); + }); +}); diff --git a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts index 0cd1b672a6..9133451e8b 100644 --- a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts @@ -1,8 +1,7 @@ /** TODO PORT ME TO <eg-combobox> */ -import {Component, OnInit, Input, Output, ViewChild, EventEmitter, ElementRef, AfterViewInit} from '@angular/core'; +import {Component, OnInit, Input, Output, ViewChild, EventEmitter, AfterViewInit} from '@angular/core'; import {Observable, Subject, map, mapTo, debounceTime, distinctUntilChanged, mergeWith as merge, filter} from 'rxjs'; import {AuthService} from '@eg/core/auth.service'; -import {StoreService} from '@eg/core/store.service'; import {ServerStoreService} from '@eg/core/server-store.service'; import {OrgService} from '@eg/core/org.service'; import {IdlObject} from '@eg/core/idl.service'; @@ -202,11 +201,9 @@ export class OrgSelectComponent implements OnInit, AfterViewInit { constructor( private auth: AuthService, - private store: StoreService, private serverStore: ServerStoreService, private org: OrgService, private perm: PermService, - private elm: ElementRef, ) { this.orgClassCallback = (orgId: number): string => ''; this.orgSelectGroup = new FormGroup({ @@ -277,7 +274,7 @@ export class OrgSelectComponent implements OnInit, AfterViewInit { ngAfterViewInit(): void { document.querySelectorAll('ngb-typeahead-window button[disabled]').forEach(b => b.setAttribute('tabindex', '-1')); - this.controller = this.instance['_elementRef'].nativeElement as HTMLInputElement; + this.controller = this.instance['_nativeElement'] as HTMLInputElement; this.controller.addEventListener('keydown', this.onKeydown.bind(this)); } ----------------------------------------------------------------------- Summary of changes: .../share/org-select/org-select.component.spec.ts | 27 ++++++++++++++++++++++ .../app/share/org-select/org-select.component.ts | 7 ++---- 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 Open-ILS/src/eg2/src/app/share/org-select/org-select.component.spec.ts hooks/post-receive -- Evergreen ILS