From 26dade03f25c1a69fd74d5071bc91b8badef9746 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 29 Apr 2023 04:24:01 -0400 Subject: [PATCH] Z7: Fix ZoteroPane tests --- test/tests/zoteroPaneTest.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tests/zoteroPaneTest.js b/test/tests/zoteroPaneTest.js index 1076f39e1c..bfb8d57fb7 100644 --- a/test/tests/zoteroPaneTest.js +++ b/test/tests/zoteroPaneTest.js @@ -19,7 +19,7 @@ describe("ZoteroPane", function() { it("should create an item and focus the title field", function* () { yield zp.newItem(Zotero.ItemTypes.getID('book'), {}, null, true); var itemBox = doc.getElementById('zotero-editpane-item-box'); - var textboxes = itemBox.shadowRoot.querySelectorAll('input, textarea'); + var textboxes = itemBox.querySelectorAll('input, textarea'); assert.lengthOf(textboxes, 1); assert.equal(textboxes[0].getAttribute('fieldname'), 'title'); textboxes[0].blur(); @@ -30,7 +30,7 @@ describe("ZoteroPane", function() { var value = "Test"; var item = yield zp.newItem(Zotero.ItemTypes.getID('book'), {}, null, true); var itemBox = doc.getElementById('zotero-editpane-item-box'); - var textbox = itemBox.shadowRoot.querySelector('textarea'); + var textbox = itemBox.querySelector('textarea'); textbox.value = value; yield itemBox.blurOpenField(); item = yield Zotero.Items.getAsync(item.id); @@ -1037,7 +1037,7 @@ describe("ZoteroPane", function() { searchBox.search.addCondition("title", "contains", "foo") ); searchBox.addCondition(c); - win.document.documentElement.acceptDialog(); + win.document.querySelector('dialog').acceptDialog(); }); yield zp.editSelectedCollection(); yield promise; @@ -1054,7 +1054,7 @@ describe("ZoteroPane", function() { searchBox.search.addCondition("title", "contains", "foo") ); searchBox.addCondition(c); - win.document.documentElement.acceptDialog(); + win.document.querySelector('dialog').acceptDialog(); }); yield zp.editSelectedCollection(); yield promise;