Fix various cases of saving items to selected collection
This changes Zotero.Translate.Base.translate() to take an options object (in order to take a 'collections' parameter, which is passed to the Zotero.Translate.ItemSaver constructor). The old parameters are still supported with a deprecation warning, and there may be other places that still need to be updated.
This commit is contained in:
parent
22b1fa8cf8
commit
08cb63f66d
8 changed files with 181 additions and 59 deletions
|
@ -45,6 +45,15 @@ describe("ZoteroPane", function() {
|
|||
assert.lengthOf(selected, 1);
|
||||
assert.equal(selected, noteID);
|
||||
})
|
||||
|
||||
it("should create a standalone note within a collection and select it", function* () {
|
||||
var collection = yield createDataObject('collection');
|
||||
var noteID = yield zp.newNote(false, false, "Test");
|
||||
assert.equal(zp.collectionsView.getSelectedCollection(), collection);
|
||||
var selected = zp.itemsView.getSelectedItems(true);
|
||||
assert.lengthOf(selected, 1);
|
||||
assert.equal(selected, noteID);
|
||||
})
|
||||
})
|
||||
|
||||
describe("#itemSelected()", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue