diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-08-16 08:36:52 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-10-01 06:11:42 +0000 |
commit | 17f5e19399151a090b177681d9cfe606e71010c2 (patch) | |
tree | 7975b8ce153b447f8fac7a670c0d41f0c5ac65cd /tests/system/shared | |
parent | 9c8400d961f765608feb94b18b614a6cb3fd57ec (diff) |
Squish: Stabilize tests that rely on a parsed project
As more and more progress bars might be present for different
purposes and we are not able to easily distinguish them
we need to use a more reliable way to wait for the end of
parsing a project.
Add a respective function and use the new approach where
this appears to be appropriate or necessary.
Change-Id: I20e2b9b0efd4785f8f0b1ddbc8496be111628669
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests/system/shared')
-rw-r--r-- | tests/system/shared/project.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 2337f4fc4f..08398f14fa 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -662,3 +662,12 @@ def addCPlusPlusFile(name, template, projectName, forceOverwrite=False, addToVCS buttonToClick = 'Cancel' clickButton("{text='%s' type='QPushButton' unnamed='1' visible='1' window=%s}" % (buttonToClick, overwriteDialog)) + +# if one of the parameters is set to 0 or below the respective parsing won't be waited for +def waitForProjectParsing(projectParsingTimeout=10000, codemodelParsingTimeout=10000): + if projectParsingTimeout > 0: + runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') + # Wait for parsing to complete + waitFor("runButton.enabled", projectParsingTimeout) + if codemodelParsingTimeout > 0: + progressBarWait(codemodelParsingTimeout) |