Allow parentItemID
as a createDataObject()
parameter in tests
Not just `parentID`
This commit is contained in:
parent
948a4dda64
commit
ad216bcf97
|
@ -411,6 +411,10 @@ function createUnsavedDataObject(objectType, params = {}) {
|
||||||
switch (objectType) {
|
switch (objectType) {
|
||||||
case 'item':
|
case 'item':
|
||||||
case 'feedItem':
|
case 'feedItem':
|
||||||
|
if (params.parentItemID) {
|
||||||
|
params.parentID = params.parentItemID;
|
||||||
|
delete params.parentItemID;
|
||||||
|
}
|
||||||
if (params.title !== undefined || params.setTitle) {
|
if (params.title !== undefined || params.setTitle) {
|
||||||
obj.setField('title', params.title !== undefined ? params.title : Zotero.Utilities.randomString());
|
obj.setField('title', params.title !== undefined ? params.title : Zotero.Utilities.randomString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user