CI test
This commit is contained in:
parent
06f359df23
commit
9ef275599d
1 changed files with 3 additions and 0 deletions
|
@ -420,6 +420,7 @@ describe("Create a note from annotations from multiple items and attachments", f
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should create a note from multiple PDF files containing single annotation", async function () {
|
it("should create a note from multiple PDF files containing single annotation", async function () {
|
||||||
|
Zotero.Debug.init(1);
|
||||||
let annotations = [];
|
let annotations = [];
|
||||||
let item = await createDataObject('item', { setTitle: true });
|
let item = await createDataObject('item', { setTitle: true });
|
||||||
let attachment1 = await importPDFAttachment(item);
|
let attachment1 = await importPDFAttachment(item);
|
||||||
|
@ -429,6 +430,8 @@ describe("Create a note from annotations from multiple items and attachments", f
|
||||||
let annotation2 = await createAnnotation('highlight', attachment2);
|
let annotation2 = await createAnnotation('highlight', attachment2);
|
||||||
annotations.push(annotation2);
|
annotations.push(annotation2);
|
||||||
let note = await Zotero.EditorInstance.createNoteFromAnnotations(annotations);
|
let note = await Zotero.EditorInstance.createNoteFromAnnotations(annotations);
|
||||||
|
Zotero.debug('=-=-=-=');
|
||||||
|
Zotero.debug(note.note);
|
||||||
assert.equal(note.note.split('test').length - 1, 2);
|
assert.equal(note.note.split('test').length - 1, 2);
|
||||||
assert.equal(note.note.split('>' + item.getField('title') + '<').length - 1, 0);
|
assert.equal(note.note.split('>' + item.getField('title') + '<').length - 1, 0);
|
||||||
assert.equal(note.note.split(annotation1.annotationText).length - 1, 1);
|
assert.equal(note.note.split(annotation1.annotationText).length - 1, 1);
|
||||||
|
|
Loading…
Reference in a new issue