diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-06-01 16:56:05 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2018-06-04 11:23:51 +0000 |
commit | 149a77a01d96aa0943c950685189719e73313378 (patch) | |
tree | a177909bf7705b9b18e2e278500ec6188e0a6082 /tests | |
parent | a926909010153bd914432fab240a5e225151237a (diff) |
Squish: Handle third kit state
Change-Id: I3442cf7676b7f316a60344b9c7dfc2d777529785
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/project_explorer.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py index dc18935e31..a26ae845d7 100644 --- a/tests/system/shared/project_explorer.py +++ b/tests/system/shared/project_explorer.py @@ -83,7 +83,10 @@ def prepareBuildSettings(targetCount, currentTarget, setReleaseBuild=True, disab # param targetCount specifies the number of targets currently defined (must be correct!) # param projectSettings specifies where to switch to (must be one of ProjectSettings.BUILD or ProjectSettings.RUN) def switchToBuildOrRunSettingsFor(targetCount, currentTarget, projectSettings): - clickToActivate = "<h3>Click to activate:</h3>" + def kitIsActivated(kit): + return not (str(kit.toolTip).startswith("<h3>Click to activate:</h3>") + or str(kit.toolTip).startswith("<h3>Kit is unsuited for Project</h3>")) + try: treeView = waitForObject(":Projects.ProjectNavigationTreeView") except LookupError: @@ -92,12 +95,12 @@ def switchToBuildOrRunSettingsFor(targetCount, currentTarget, projectSettings): targetIndices = dumpIndices(treeView.model(), waitForObject(bAndRIndex)) targets = map(lambda t: str(t.data(0)), - filter(lambda x: not str(x.toolTip).startswith(clickToActivate), targetIndices)) + filter(kitIsActivated, targetIndices)) if not test.compare(targetCount, len(targets), "Check whether all chosen targets are listed."): return False # we assume the targets are still ordered the same way currentTargetIndex = getQModelIndexStr("text='%s'" % targets[currentTarget], bAndRIndex) - if not test.verify(not str(findObject(currentTargetIndex).toolTip).startswith(clickToActivate), + if not test.verify(kitIsActivated(findObject(currentTargetIndex)), "Verifying target '%s' is enabled." % targets[currentTarget]): return False index = waitForObject(currentTargetIndex) |