From 69dcbda1a0e7b82560771a00ffd9dec3e77afa55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Fri, 21 Mar 2025 12:22:08 +0200 Subject: [PATCH] Misc test fixes (#5148) Remove redundant and wrong call to changeCollectionTreeRow() in advancedSearch which triggers test errors sometimes, and disable prompt button delay when running tests everywhere, not just CI --- chrome/content/zotero/advancedSearch.js | 1 - chrome/content/zotero/xpcom/prompt.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js index 019ae36332..77a4b94d36 100644 --- a/chrome/content/zotero/advancedSearch.js +++ b/chrome/content/zotero/advancedSearch.js @@ -87,7 +87,6 @@ var ZoteroAdvancedSearch = new function() { isSearch: () => true }); - this.itemsView.changeCollectionTreeRow(collectionTreeRow); // Focus the first field in the window Services.focus.moveFocus(window, null, Services.focus.MOVEFOCUS_FORWARD, 0); } diff --git a/chrome/content/zotero/xpcom/prompt.js b/chrome/content/zotero/xpcom/prompt.js index 577b584400..17390a4402 100644 --- a/chrome/content/zotero/xpcom/prompt.js +++ b/chrome/content/zotero/xpcom/prompt.js @@ -71,7 +71,7 @@ Zotero.Prompt = { Zotero.warn("Zotero.Prompt.confirm() option 'delayButtons' is deprecated -- use 'buttonDelay'"); buttonDelay = true; } - let flags = (buttonDelay && !Zotero.automatedTest) ? Services.prompt.BUTTON_DELAY_ENABLE : 0; + let flags = (buttonDelay && !Zotero.test) ? Services.prompt.BUTTON_DELAY_ENABLE : 0; if (typeof button0 == 'number') flags += Services.prompt.BUTTON_POS_0 * button0; else if (typeof button0 == 'string') flags += Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING; if (typeof button1 == 'number') flags += Services.prompt.BUTTON_POS_1 * button1;