From 301b06ca4c5d2340b9054fb8a83966be16354f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Fri, 15 Mar 2024 17:33:34 +0100 Subject: [PATCH] SquishTests: Make sure targets' details are collapsed after choosing Other code expects all of them to be collapsed, but Creator 13 expands them when checking. This change makes sure they are collapsed afterwards. The new code is backwards compatible with the old behavior. Change-Id: Ic698fb17f3ad1573195e7e0f7bcf722beed74ffc Reviewed-by: Reviewed-by: Christian Stenger --- tests/system/shared/project.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 71689babf77..00641e465be 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -428,19 +428,19 @@ def __chooseTargets__(targets, availableTargets=None, additionalFunc=None): try: ensureChecked("{type='QCheckBox' text='%s' visible='1'}" % Targets.getStringForTarget(current), mustCheck, 3000) + detailsWidget = waitForObject("{type='Utils::DetailsWidget' unnamed='1' " + "window=':Qt Creator_Core::Internal::MainWindow' " + "summaryText='%s' visible='1'}" + % Targets.getStringForTarget(current)) + detailsButton = getChildByClass(detailsWidget, "QToolButton") if mustCheck: checkedTargets.add(current) # perform additional function on detailed kits view if additionalFunc: - detailsWidget = waitForObject("{type='Utils::DetailsWidget' unnamed='1' " - "window=':Qt Creator_Core::Internal::MainWindow' " - "summaryText='%s' visible='1'}" - % Targets.getStringForTarget(current)) - detailsButton = getChildByClass(detailsWidget, "QToolButton") - clickButton(detailsButton) + ensureChecked(detailsButton) additionalFunc() - clickButton(detailsButton) + ensureChecked(detailsButton, False) except LookupError: if mustCheck: test.fail("Failed to check target '%s'." % Targets.getStringForTarget(current))