From cfb26a06a7fc63363ffc61e4f3e12c0efd440b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Thu, 15 Feb 2024 17:16:32 +0100 Subject: [PATCH] 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 Reviewed-by: Reviewed-by: Christian Stenger --- tests/system/shared/build_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index c26634f61db..fbc89c5920f 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -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):