Replace occurrences of .getNote()
with .note
This commit is contained in:
parent
ebc53a2bbc
commit
4142f4b316
12 changed files with 36 additions and 36 deletions
|
@ -213,13 +213,13 @@ describe("Zotero.Translate", function() {
|
|||
let noteIDs = newItems["Test Item"].getNotes();
|
||||
let note1 = yield Zotero.Items.getAsync(noteIDs[0]);
|
||||
assert.equal(Zotero.ItemTypes.getName(note1.itemTypeID), "note");
|
||||
assert.equal(note1.getNote(), "1 note as string");
|
||||
assert.equal(note1.note, "1 note as string");
|
||||
let note2 = yield Zotero.Items.getAsync(noteIDs[1]);
|
||||
assert.equal(Zotero.ItemTypes.getName(note2.itemTypeID), "note");
|
||||
assert.equal(note2.getNote(), "2 note as object");
|
||||
assert.equal(note2.note, "2 note as object");
|
||||
checkTestTags(note2);
|
||||
let note3 = newItems["standalone note"];
|
||||
assert.equal(note3.getNote(), "standalone note");
|
||||
assert.equal(note3.note, "standalone note");
|
||||
checkTestTags(note3);
|
||||
});
|
||||
|
||||
|
@ -323,20 +323,20 @@ describe("Zotero.Translate", function() {
|
|||
for (let savedAttachments of [[newItems["Empty PDF"], newItems["Link to zotero.org"]],
|
||||
[containedAttachments[0], containedAttachments[1]]]) {
|
||||
assert.equal(savedAttachments[0].getField("title"), "Empty PDF");
|
||||
assert.equal(savedAttachments[0].getNote(), "attachment note");
|
||||
assert.equal(savedAttachments[0].note, "attachment note");
|
||||
assert.equal(savedAttachments[0].attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_FILE);
|
||||
checkTestTags(savedAttachments[0]);
|
||||
|
||||
assert.equal(savedAttachments[1].getField("title"), "Link to zotero.org");
|
||||
assert.equal(savedAttachments[1].getField("url"), "http://www.zotero.org/");
|
||||
assert.equal(savedAttachments[1].getNote(), "attachment 2 note");
|
||||
assert.equal(savedAttachments[1].note, "attachment 2 note");
|
||||
assert.equal(savedAttachments[1].attachmentLinkMode, Zotero.Attachments.LINK_MODE_LINKED_URL);
|
||||
checkTestTags(savedAttachments[1]);
|
||||
}
|
||||
|
||||
assert.equal(containedAttachments[2].getField("title"), "Snapshot");
|
||||
assert.equal(containedAttachments[2].getField("url"), "http://www.example.com/");
|
||||
assert.equal(containedAttachments[2].getNote(), "attachment 3 note");
|
||||
assert.equal(containedAttachments[2].note, "attachment 3 note");
|
||||
assert.equal(containedAttachments[2].attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
checkTestTags(containedAttachments[2]);
|
||||
});
|
||||
|
@ -371,7 +371,7 @@ describe("Zotero.Translate", function() {
|
|||
|
||||
assert.equal(containedAttachments[0].getField("title"), "Snapshot with missing file");
|
||||
assert.equal(containedAttachments[0].getField("url"), "http://www.example.com/");
|
||||
assert.equal(containedAttachments[0].getNote(), "attachment note");
|
||||
assert.equal(containedAttachments[0].note, "attachment note");
|
||||
assert.equal(containedAttachments[0].attachmentLinkMode, Zotero.Attachments.LINK_MODE_LINKED_URL);
|
||||
checkTestTags(containedAttachments[0]);
|
||||
});
|
||||
|
@ -548,7 +548,7 @@ describe("Zotero.Translate", function() {
|
|||
assert.equal(attachments[1].attachmentLinkMode, Zotero.Attachments.LINK_MODE_LINKED_FILE);
|
||||
assert.equal(attachments[1].attachmentContentType, 'text/html');
|
||||
assert.equal(attachments[1].attachmentCharset, 'utf-8');
|
||||
assert.equal(attachments[1].getNote(), file2URL);
|
||||
assert.equal(attachments[1].note, file2URL);
|
||||
});
|
||||
|
||||
it("import translators shouldn't save linked-file attachment with linkFiles: true if path is within current storage directory", async function () {
|
||||
|
@ -648,20 +648,20 @@ describe("Zotero.Translate", function() {
|
|||
|
||||
let link = containedAttachments["Link to zotero.org"];
|
||||
assert.equal(link.getField("url"), "http://www.zotero.org/");
|
||||
assert.equal(link.getNote(), "attachment note");
|
||||
assert.equal(link.note, "attachment note");
|
||||
assert.equal(link.attachmentLinkMode, Zotero.Attachments.LINK_MODE_LINKED_URL);
|
||||
checkTestTags(link, true);
|
||||
|
||||
let snapshot = containedAttachments["Test Snapshot"];
|
||||
assert.equal(snapshot.getField("url"), "http://127.0.0.1:23119/test/translate/test.html");
|
||||
assert.equal(snapshot.getNote(), "attachment 2 note");
|
||||
assert.equal(snapshot.note, "attachment 2 note");
|
||||
assert.equal(snapshot.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
assert.equal(snapshot.attachmentContentType, "text/html");
|
||||
checkTestTags(snapshot, true);
|
||||
|
||||
let pdf = containedAttachments["Test PDF"];
|
||||
assert.equal(pdf.getField("url"), "http://127.0.0.1:23119/test/translate/test.pdf");
|
||||
assert.equal(pdf.getNote(), "attachment 3 note");
|
||||
assert.equal(pdf.note, "attachment 3 note");
|
||||
assert.equal(pdf.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
assert.equal(pdf.attachmentContentType, "application/pdf");
|
||||
checkTestTags(pdf, true);
|
||||
|
@ -700,7 +700,7 @@ describe("Zotero.Translate", function() {
|
|||
|
||||
let snapshot = containedAttachments[0];
|
||||
assert.equal(snapshot.getField("url"), "http://127.0.0.1:23119/test/translate/test.html");
|
||||
assert.equal(snapshot.getNote(), "attachment note");
|
||||
assert.equal(snapshot.note, "attachment note");
|
||||
assert.equal(snapshot.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
assert.equal(snapshot.attachmentContentType, "text/html");
|
||||
checkTestTags(snapshot, true);
|
||||
|
@ -734,7 +734,7 @@ describe("Zotero.Translate", function() {
|
|||
|
||||
let snapshot = containedAttachments[0];
|
||||
assert.equal(snapshot.getField("url"), "http://127.0.0.1:23119/test/translate/test.html");
|
||||
assert.equal(snapshot.getNote(), "attachment note");
|
||||
assert.equal(snapshot.note, "attachment note");
|
||||
assert.equal(snapshot.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
assert.equal(snapshot.attachmentContentType, "text/html");
|
||||
checkTestTags(snapshot, true);
|
||||
|
@ -798,7 +798,7 @@ describe("Zotero.Translate", function() {
|
|||
let pdf = containedAttachments[0];
|
||||
assert.equal(pdf.getField("title"), "Test PDF");
|
||||
assert.equal(pdf.getField("url"), "http://127.0.0.1:23119/test/translate/test.pdf");
|
||||
assert.equal(pdf.getNote(), "attachment note");
|
||||
assert.equal(pdf.note, "attachment note");
|
||||
assert.equal(pdf.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
checkTestTags(pdf, true);
|
||||
});
|
||||
|
@ -901,7 +901,7 @@ describe("Zotero.Translate", function() {
|
|||
|
||||
var snapshot = containedAttachments[0];
|
||||
assert.equal(snapshot.getField("url"), url + '?t');
|
||||
assert.equal(snapshot.getNote(), "attachment note");
|
||||
assert.equal(snapshot.note, "attachment note");
|
||||
assert.equal(snapshot.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
assert.equal(snapshot.attachmentContentType, "text/html");
|
||||
checkTestTags(snapshot, true);
|
||||
|
@ -951,7 +951,7 @@ describe("Zotero.Translate", function() {
|
|||
|
||||
var snapshot = containedAttachments[0];
|
||||
assert.equal(snapshot.getField("url"), url);
|
||||
assert.equal(snapshot.getNote(), "attachment note");
|
||||
assert.equal(snapshot.note, "attachment note");
|
||||
assert.equal(snapshot.attachmentLinkMode, Zotero.Attachments.LINK_MODE_IMPORTED_URL);
|
||||
assert.equal(snapshot.attachmentContentType, "text/html");
|
||||
checkTestTags(snapshot, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue