Increase wait time for pdf-reader iframe initialization in tests
This is necessary until a proper initialization promise is added to pdf-reader.
This commit is contained in:
parent
a8a0cabcc4
commit
6bc1551f7f
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ describe("PDF Reader", function () {
|
|||
var reader = await Zotero.Reader.open(attachment.itemID);
|
||||
// TODO: Implement a promise that would be resolved when pdf-reader is completely loaded
|
||||
var n = 0;
|
||||
while ((!reader._iframeWindow || !reader._iframeWindow.wrappedJSObject.PDFViewerApplication.pdfDocument) && n++ < 50) {
|
||||
while ((!reader._iframeWindow || !reader._iframeWindow.wrappedJSObject.PDFViewerApplication.pdfDocument) && n++ < 150) {
|
||||
await Zotero.Promise.delay(100);
|
||||
}
|
||||
await reader._iframeWindow.wrappedJSObject.viewerInstance._viewer._pdfjsPromise;
|
||||
|
|
Loading…
Reference in a new issue