From 5f631ff0af00a42d3f46a83c1dd99d58d8f78e3a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 28 Apr 2023 01:50:42 -0400 Subject: [PATCH] Add `delay()` test support function `Zotero.Promise.delay()` wrapper --- test/content/support.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/content/support.js b/test/content/support.js index 5a064505d4..3540e195be 100644 --- a/test/content/support.js +++ b/test/content/support.js @@ -348,6 +348,11 @@ function waitForCallback(cb, interval, timeout) { } +async function delay(ms) { + return Zotero.Promise.delay(ms); +} + + function clickOnItemsRow(win, itemsView, row) { itemsView._treebox.scrollToRow(row); let elem = win.document.querySelector(`#${itemsView.id}-row-${row}`);