diff --git a/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.spec.ts b/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.spec.ts index 6bbbf71a52..efee968f4a 100644 --- a/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.spec.ts +++ b/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.spec.ts @@ -381,14 +381,16 @@ fdescribe('Test PdfViewer - Zoom customization', () => { }); describe('custom value', () => { - beforeEach(async () => { + beforeEach((done) => { const appConfig: AppConfigService = TestBed.inject(AppConfigService); appConfig.config['adf-viewer.pdf-viewer-scaling'] = 80; fixtureUrlTestComponent.detectChanges(); - await fixtureUrlTestComponent.whenRenderingDone(); - await firstValueFrom(componentUrlTestComponent.pdfViewerComponent.rendered); - }); + + firstValueFrom(componentUrlTestComponent.pdfViewerComponent.rendered).then(() => { + done(); + }); + }, 55000); it('should use the custom zoom if it is present in the app.config', fakeAsync(() => { spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {}); diff --git a/lib/js-api/src/test-setup.ts b/lib/js-api/src/test-setup.ts index 32927d2cc4..01a3bf8e29 100644 --- a/lib/js-api/src/test-setup.ts +++ b/lib/js-api/src/test-setup.ts @@ -16,3 +16,4 @@ */ import 'jest-preset-angular/setup-jest'; +import 'resize-observer-polyfill/dist/ResizeObserver.global';