Properly check schema version in note editor tests

This commit is contained in:
Martynas Bagdonas 2021-04-02 21:57:35 +03:00
parent 415e644211
commit 20022a5d7c
2 changed files with 2 additions and 1 deletions

View file

@ -1117,3 +1117,4 @@ class EditorInstance {
}
Zotero.EditorInstance = EditorInstance;
Zotero.EditorInstance.SCHEMA_VERSION = SCHEMA_VERSION;

View file

@ -291,7 +291,7 @@ describe("Item pane", function () {
// 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>');
} while(noteEditor._editorInstance._iframeWindow.wrappedJSObject.getDataSync().html.replace(/\n/g,'') != `<div data-schema-version="${Zotero.EditorInstance.SCHEMA_VERSION}"><p>Test</p></div>`);
});
});