mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-21 10:29:29 -05:00
Refactor
This commit is contained in:
parent
7df631f1b0
commit
90eb7c3713
@ -170,7 +170,7 @@ describe('PreviewPopupComponent', () => {
|
|||||||
dispatch: jest.fn(),
|
dispatch: jest.fn(),
|
||||||
} as any)
|
} as any)
|
||||||
const dispatchSpy = jest.spyOn(component.pdfViewer.eventBus, 'dispatch')
|
const dispatchSpy = jest.spyOn(component.pdfViewer.eventBus, 'dispatch')
|
||||||
component.onViewerLoaded()
|
component.onPageRendered()
|
||||||
expect(dispatchSpy).toHaveBeenCalledWith('find', {
|
expect(dispatchSpy).toHaveBeenCalledWith('find', {
|
||||||
query: 'test',
|
query: 'test',
|
||||||
caseSensitive: false,
|
caseSensitive: false,
|
||||||
|
@ -116,7 +116,8 @@ export class PreviewPopupComponent implements OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onViewerLoaded() {
|
onPageRendered() {
|
||||||
|
// Only triggered by the pngx pdf viewer
|
||||||
if (this.documentService.searchQuery) {
|
if (this.documentService.searchQuery) {
|
||||||
this.pdfViewer.eventBus.dispatch('find', {
|
this.pdfViewer.eventBus.dispatch('find', {
|
||||||
query: this.documentService.searchQuery,
|
query: this.documentService.searchQuery,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user