Feeds electron compatiblity
This commit is contained in:
parent
6ec6790265
commit
1a6683e7db
4 changed files with 7 additions and 4 deletions
|
@ -197,7 +197,7 @@ Zotero.FeedReader.prototype.terminate = function(status) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close feed connection
|
// Close feed connection
|
||||||
if (this._channel.isPending()) {
|
if (this._channel && this._channel.isPending()) {
|
||||||
this._channel.cancel(Components.results.NS_BINDING_ABORTED);
|
this._channel.cancel(Components.results.NS_BINDING_ABORTED);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -218,7 +218,7 @@ describe("Zotero.FeedItem", function () {
|
||||||
yield item.toggleRead(true);
|
yield item.toggleRead(true);
|
||||||
assert.isTrue(item.save.called, "item was saved on toggle read");
|
assert.isTrue(item.save.called, "item was saved on toggle read");
|
||||||
|
|
||||||
item.save.reset();
|
item.save.resetHistory();
|
||||||
|
|
||||||
yield item.toggleRead(true);
|
yield item.toggleRead(true);
|
||||||
assert.isFalse(item.save.called, "item was not saved on toggle read to same state");
|
assert.isFalse(item.save.called, "item was not saved on toggle read to same state");
|
||||||
|
|
|
@ -96,11 +96,11 @@ describe("Zotero.FeedItems", function () {
|
||||||
yield item.saveTx();
|
yield item.saveTx();
|
||||||
items.push(item);
|
items.push(item);
|
||||||
}
|
}
|
||||||
ids = Array.map(items, (i) => i.id);
|
ids = items.map((i) => i.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function* () {
|
afterEach(function* () {
|
||||||
save.reset();
|
save.resetHistory();
|
||||||
|
|
||||||
yield clearFeeds();
|
yield clearFeeds();
|
||||||
});
|
});
|
||||||
|
|
|
@ -160,6 +160,9 @@ describe("Zotero.FeedReader", function () {
|
||||||
itemType: 'journalArticle',
|
itemType: 'journalArticle',
|
||||||
enclosedItems: []
|
enclosedItems: []
|
||||||
};
|
};
|
||||||
|
if (Zotero.isElectron) {
|
||||||
|
expected.pages = "10–20";
|
||||||
|
}
|
||||||
|
|
||||||
let fr = new Zotero.FeedReader(detailedRSSFeedURL);
|
let fr = new Zotero.FeedReader(detailedRSSFeedURL);
|
||||||
yield fr.process();
|
yield fr.process();
|
||||||
|
|
Loading…
Reference in a new issue