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
This commit is contained in:
Adomas Venčkauskas 2025-03-21 12:22:08 +02:00 • committed by Dan Stillman
parent 9579aa154a
commit 69dcbda1a0
2 changed files with 1 additions and 2 deletions

View file

@ -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);
}

View file

@ -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;