From 62e57661e100d9b2b14b154339f114d87d78d05e Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:45:46 -0700 Subject: [PATCH] 1 missing line ftw --- .../document-detail/document-detail.component.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts index 0a8c5f6a5..efd7e8191 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts @@ -774,6 +774,15 @@ describe('DocumentDetailComponent', () => { expect(component.previewNumPages).toEqual(1000) }) + it('should include delay of 300ms after previewloaded before showing pdf', fakeAsync(() => { + initNormally() + expect(component.previewLoaded).toBeFalsy() + component.pdfPreviewLoaded({ numPages: 1000 } as any) + expect(component.previewNumPages).toEqual(1000) + tick(300) + expect(component.previewLoaded).toBeTruthy() + })) + it('should support zoom controls', () => { initNormally() component.onZoomSelect({ target: { value: '1' } } as any) // from select