scripting: Return promise in helper window wait functions

Otherwise they won't wait when doing e.g. `await waitTestWindows();`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
This commit is contained in:
Jonas Ådahl 2023-04-18 16:27:58 +02:00
parent c2412dbe59
commit 8d1fe3b4cb

View File

@ -126,7 +126,7 @@ function createTestWindow(params) {
*/
function waitTestWindows() {
let perfHelper = _getPerfHelper();
perfHelper.WaitWindowsAsync().catch(logError);
return perfHelper.WaitWindowsAsync().catch(logError);
}
/**
@ -141,7 +141,7 @@ function waitTestWindows() {
*/
function destroyTestWindows() {
let perfHelper = _getPerfHelper();
perfHelper.DestroyWindowsAsync().catch(logError);
return perfHelper.DestroyWindowsAsync().catch(logError);
}
/**