forked from qt-creator/qt-creator
SquishTests: Wait for combo box popup closing
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 <robert.loehning@qt.io>
This commit is contained in:
@@ -81,6 +81,14 @@ def selectFromCombo(objectSpec, itemName):
|
|||||||
mouseClick(waitForObjectItem(comboObject, itemName.replace(".", "\\.")))
|
mouseClick(waitForObjectItem(comboObject, itemName.replace(".", "\\.")))
|
||||||
test.verify(waitFor("str(comboObject.currentText)==itemName", 5000),
|
test.verify(waitFor("str(comboObject.currentText)==itemName", 5000),
|
||||||
"Switched combo item to '%s'" % itemName)
|
"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
|
return True
|
||||||
|
|
||||||
def selectFromLocator(filter, itemName = None):
|
def selectFromLocator(filter, itemName = None):
|
||||||
|
Reference in New Issue
Block a user