Fix note editor tests
This commit is contained in:
parent
232ffba2ab
commit
5266734ac9
5 changed files with 22 additions and 10 deletions
|
@ -282,16 +282,18 @@ describe("Item pane", function () {
|
|||
|
||||
// Wait for the editor
|
||||
yield new Zotero.Promise((resolve, reject) => {
|
||||
noteEditor.noteField.onInit(() => resolve());
|
||||
})
|
||||
assert.equal(noteEditor.noteField.value, '');
|
||||
|
||||
noteEditor.onInit(() => resolve());
|
||||
});
|
||||
assert.equal(noteEditor._editorInstance._iframeWindow.wrappedJSObject.getDataSync(), null);
|
||||
item.setNote('<p>Test</p>');
|
||||
yield item.saveTx();
|
||||
|
||||
assert.equal(noteEditor.noteField.value, '<p>Test</p>');
|
||||
})
|
||||
})
|
||||
// Wait for asynchronous editor update
|
||||
do {
|
||||
yield Zotero.Promise.delay(10);
|
||||
} while(noteEditor._editorInstance._iframeWindow.wrappedJSObject.getDataSync().html != '<div data-schema-version="1"><p>Test</p></div>');
|
||||
});
|
||||
});
|
||||
|
||||
describe("Feed buttons", function() {
|
||||
describe("Mark as Read/Unread", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue