2016-06-11 00:35:14 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
describe("Note Editor", function () {
|
|
|
|
var win, zp;
|
|
|
|
|
|
|
|
before(function* () {
|
|
|
|
win = yield loadZoteroPane();
|
|
|
|
zp = win.ZoteroPane;
|
|
|
|
});
|
|
|
|
|
|
|
|
after(function () {
|
|
|
|
win.close();
|
|
|
|
});
|
|
|
|
|
2017-04-01 18:29:45 +00:00
|
|
|
var waitForNoteEditor = Zotero.Promise.coroutine(function* (item) {
|
|
|
|
var noteEditor = win.document.getElementById('zotero-note-editor');
|
|
|
|
while (noteEditor.item != item) {
|
|
|
|
Zotero.debug("Waiting for note editor");
|
|
|
|
yield Zotero.Promise.delay(50);
|
|
|
|
noteEditor = win.document.getElementById('zotero-note-editor');
|
|
|
|
}
|
|
|
|
return new Zotero.Promise((resolve, reject) => {
|
2021-01-13 12:01:44 +00:00
|
|
|
noteEditor.onInit(() => resolve(noteEditor));
|
2017-04-01 18:29:45 +00:00
|
|
|
});
|
|
|
|
});
|
2016-06-11 00:35:14 +00:00
|
|
|
});
|