zotero/test/tests/noteeditorTest.js
Dan Stillman b66ac0d493 Remove tags-box tests in note editor tests
Will be moved to separate tags-box tests
2024-01-24 23:32:20 -05:00

26 lines
637 B
JavaScript

"use strict";
describe("Note Editor", function () {
var win, zp;
before(function* () {
win = yield loadZoteroPane();
zp = win.ZoteroPane;
});
after(function () {
win.close();
});
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) => {
noteEditor.onInit(() => resolve(noteEditor));
});
});
});