commit 0bf546a0aa1f37abe3ff0ff0809e83cbe188fe91
parent a3e711b7b5b10cb3787ec929d8d71092d59ba8e4
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 3 Nov 2017 04:47:04 -0400
Fix test after a3e711b7b5
Diffstat:
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/test/tests/itemPaneTest.js b/test/tests/itemPaneTest.js
@@ -274,11 +274,19 @@ describe("Item pane", function () {
describe("Feed buttons", function() {
describe("Mark as Read/Unread", function() {
- it("Updates label when state of an item changes", function* () {
+ it("should update label when state of an item changes", function* () {
let feed = yield createFeed();
yield selectLibrary(win, feed.libraryID);
- let item = yield createDataObject('feedItem', {libraryID: feed.libraryID});
- yield itemsView.selectItem(item.id);
+ yield waitForItemsLoad(win);
+
+ var stub = sinon.stub(win.ZoteroPane, 'startItemReadTimeout');
+ var item = yield createDataObject('feedItem', { libraryID: feed.libraryID });
+ // Skip timed mark-as-read
+ assert.ok(stub.called);
+ stub.restore();
+ item.isRead = true;
+ yield item.saveTx();
+
let button = doc.getElementById('zotero-feed-item-toggleRead-button');
assert.equal(button.getAttribute('label'), Zotero.getString('pane.item.markAsUnread'));