forked from qt-creator/qt-creator
SquishTests: Improve toggling filter names in "Issues" view
- Explicitly set a shorter timeout. After the menu appears, it should not take that long until the item is there, too. - Warn when an item can't be found. This should not go unnoticed, because it either means that the GUI changed or that there's a bug in the test. Both require a fix. Change-Id: Id7faa2b91926c392bd0d894214f498d8ba8edaa1 Reviewed-by: Jukka Nokso <jukka.nokso@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -9,7 +9,7 @@ def toggleIssuesFilter(filterName, checked):
|
||||
filterMenu = waitForObject("{type='QMenu' unnamed='1' visible='1'}")
|
||||
waitFor("filterMenu.visible", 1000)
|
||||
|
||||
filterCategory = waitForObjectItem(filterMenu, filterName)
|
||||
filterCategory = waitForObjectItem(filterMenu, filterName, 1000)
|
||||
waitFor("filterCategory.visible", 2000)
|
||||
if filterCategory.checked == checked:
|
||||
test.log("Filter '%s' has already check state %s - not toggling."
|
||||
@@ -20,8 +20,8 @@ def toggleIssuesFilter(filterName, checked):
|
||||
test.log("Filter '%s' check state changed to %s." % (filterName, checked))
|
||||
except:
|
||||
t,v = sys.exc_info()[:2]
|
||||
test.log("Exception while toggling filter '%s'" % filterName,
|
||||
"%s: %s" % (t.__name__, str(v)))
|
||||
test.warning("Exception while toggling filter '%s'" % filterName,
|
||||
"%s: %s" % (t.__name__, str(v)))
|
||||
|
||||
|
||||
def getBuildIssues(ignoreCodeModel=True):
|
||||
|
||||
Reference in New Issue
Block a user