zotero / scaffold

Zotero translator creation IDE
http://www.zotero.org/support/dev/scaffold
38 stars 9 forks source link

Wait for the page to load for tests with defer=true #96

Closed zuphilip closed 4 years ago

zuphilip commented 6 years ago

See https://groups.google.com/forum/#!topic/zotero-dev/Dy01PtaZ53E

zuphilip commented 5 years ago

As far as I can see running tests in Scaffold relies on the Zotero_TranslatorTester of the core zotero code. There, I can see that we had the following line in the history

Zotero.setTimeout(() => runTest(doc), Zotero_TranslatorTester.DEFER_DELAY);

which was replaced by new code in https://github.com/zotero/zotero/commit/23cf6bd0078fb3c148dc10a2493710cb7e9c61eb#diff-d1b2c29ea739ddc3595f907c91df97bc but without caring about delaying the function for some time if this variable is set.

Can we add this functionality again to that code around https://github.com/zotero/zotero/blob/070643060987884f5d85b06c580d74807dd5ea17/chrome/content/zotero/tools/testTranslators/translatorTester.js#L420-L422 ? @dstillman Could you look into this?