From 8781befcfbbc4a2dee68e8a06ca4a0985128b20a Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 2 Apr 2024 15:49:11 +0200 Subject: [PATCH] SquishTests: Wait for combo box popup closing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On systems where some ui features may be using animations the animation could interfere with the test. Explicitly wait a short amount of time as there is no easy way to achieve this. This fixes a couple of tests on macOS. Change-Id: Ib79b43955ebf218342db108a43979093994fba02 Reviewed-by: Robert Löhning --- tests/system/shared/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 7e6b91a961f..623287563a3 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -81,6 +81,14 @@ def selectFromCombo(objectSpec, itemName): mouseClick(waitForObjectItem(comboObject, itemName.replace(".", "\\."))) test.verify(waitFor("str(comboObject.currentText)==itemName", 5000), "Switched combo item to '%s'" % itemName) + def __collapsed__(): + try: + waitForObject("{container='%s' type='QModelIndex'}" % objectSpec, 100) + return False + except: + return True + + waitFor(__collapsed__, 1000) return True def selectFromLocator(filter, itemName = None):