From e7c736750941cbe9be2bb95017c5bad934608533 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Fri, 31 May 2024 05:54:26 -0400 Subject: [PATCH] zp tab focus tests pass if run on their own (#4183) Make sure that more than one tab is opened before tab navigation tests are run so that the tabs menu is always focusable. Fixes: #4180 --- test/tests/zoteroPaneTest.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/tests/zoteroPaneTest.js b/test/tests/zoteroPaneTest.js index 6a57d05193..6be891282f 100644 --- a/test/tests/zoteroPaneTest.js +++ b/test/tests/zoteroPaneTest.js @@ -1501,6 +1501,13 @@ describe("ZoteroPane", function() { await item.saveTx({ skipSelect: true }); + // Make sure there is more than one tab so that the tabs menu is focusable + if (win.Zotero_Tabs.numTabs == 1) { + let attachment = await importFileAttachment('test.pdf'); + await attachment.saveTx(); + await zp.viewAttachment(attachment.id); + win.Zotero_Tabs.select('zotero-pane'); + } await waitForItemsLoad(win); await zp.collectionsView.selectLibrary(userLibraryID); });