Migrate to new animations api (#12078)

This commit is contained in:
Denys Vuika
2026-07-23 12:21:10 +01:00
committed by GitHub
parent 9f21d602fc
commit 85ec35cdf9
62 changed files with 849 additions and 989 deletions
@@ -20,7 +20,20 @@ import { PdfThumbListComponent } from './pdf-viewer-thumbnails.component';
import { UnitTestingUtils } from '@alfresco/adf-core';
import { DOWN_ARROW, ESCAPE, UP_ARROW } from '@angular/cdk/keycodes';
declare const pdfjsViewer: any;
class EventBusMock {
private readonly listeners = new Map<string, Array<(payload: any) => void>>();
on(eventName: string, callback: (payload: any) => void): void {
const handlers = this.listeners.get(eventName) ?? [];
handlers.push(callback);
this.listeners.set(eventName, handlers);
}
dispatch(eventName: string, payload: any): void {
const handlers = this.listeners.get(eventName) ?? [];
handlers.forEach((handler) => handler(payload));
}
}
describe('PdfThumbListComponent', () => {
let fixture: ComponentFixture<PdfThumbListComponent>;
@@ -67,7 +80,7 @@ describe('PdfThumbListComponent', () => {
page(15),
page(16)
],
eventBus: new pdfjsViewer.EventBus()
eventBus: new EventBusMock()
};
beforeEach(() => {