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: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2024-03-15 17:33:34 +01:00
parent 720ab253b1
commit 301b06ca4c

View File

@@ -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))