[AAE-4009] Fix horizontal scroll issue for pdf-viewer (#7023)

* [AAE-4009] Fix horizontal scroll issue for pdf-viewer

* [AAE-4009] Rewrite method with single exit
This commit is contained in:
Nanna Setämaa
2021-05-17 11:35:26 +01:00
committed by GitHub
parent f3ada4ef85
commit f7ec24d1bb
2 changed files with 26 additions and 0 deletions

View File

@@ -625,6 +625,16 @@ describe('Test PdfViewer component', () => {
});
}, 25000);
it('should check if page fits to documentContainer', (done) => {
spyOn(componentUrlTestComponent.pdfViewerComponent, 'checkPageFitInContainer');
componentUrlTestComponent.pdfViewerComponent.scalePage(1);
fixtureUrlTestComponent.detectChanges();
fixtureUrlTestComponent.whenStable().then(() => {
expect(componentUrlTestComponent.pdfViewerComponent.checkPageFitInContainer).toHaveBeenCalled();
done();
});
});
});
describe('Zoom', () => {