From aaac18ced62d5ef14df29def6259bec5a280cf54 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 24 Jun 2024 02:32:32 -0400 Subject: [PATCH] Tests: Add convenience function to pause execution without timing out `await pause(this)` can be used to disable the test timeout and pause execution so the UI state can be manually inspected --- test/content/support.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/content/support.js b/test/content/support.js index af22c7d7c4..c002502009 100644 --- a/test/content/support.js +++ b/test/content/support.js @@ -374,6 +374,14 @@ function waitForNotifierEvent(event, type) { return deferred.promise; } +/** + * Hang tests for manual inspection + */ +async function pause(thisObj) { + thisObj.timeout(100000000); + await Zotero.Promise.delay(100000000); +} + /** * Looks for windows with a specific URL. */