summaryrefslogtreecommitdiff
path: root/tests/system/suite_general/tst_create_proj_wizard/test.py
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2017-02-14 11:09:19 +0100
committerChristian Stenger <christian.stenger@qt.io>2017-02-20 14:56:38 +0000
commit834924277045e27bb7ea7651f709ad4bd87ab312 (patch)
tree4d83334a88f5e55cb8adb99fb6f7d3b6466a2c81 /tests/system/suite_general/tst_create_proj_wizard/test.py
parent8a74595bb2cb8985312b3b02ec92a0bd1fd3477a (diff)
downloadqt-creator-834924277045e27bb7ea7651f709ad4bd87ab312.tar.gz
Squish: Adapt to changes of project wizards
Some project wizards have nowadays build system support. Change-Id: I2d7e9ffd5be2ec74a012fa977281e032596229b5 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests/system/suite_general/tst_create_proj_wizard/test.py')
-rw-r--r--tests/system/suite_general/tst_create_proj_wizard/test.py63
1 files changed, 42 insertions, 21 deletions
diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py
index 126e1f3d7e..a172b664c7 100644
--- a/tests/system/suite_general/tst_create_proj_wizard/test.py
+++ b/tests/system/suite_general/tst_create_proj_wizard/test.py
@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
- global tmpSettingsDir
+ global tmpSettingsDir, availableBuildSystems
qtVersionsForQuick = ["5.3"]
availableBuildSystems = ["qmake", "Qbs"]
if platform.system() != 'Darwin':
@@ -65,7 +65,8 @@ def main():
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
template = template.replace(".", "\\.")
# skip non-configurable
- if not template in ["Qt Quick UI", "Qt Quick Controls UI", "Qt Canvas 3D Application"]:
+ if not template in ["Qt Quick UI", "Qt Quick Controls UI", "Qt Canvas 3D Application",
+ "Auto Test Project"]: # FIXME
availableProjectTypes.append({category:template})
safeClickButton("Cancel")
for current in availableProjectTypes:
@@ -74,34 +75,25 @@ def main():
displayedPlatforms = __createProject__(category, template)
if template == "Qt Quick Application" or template == "Qt Quick Controls Application":
for counter, qtVersion in enumerate(qtVersionsForQuick):
- requiredQtVersion = __createProjectHandleQtQuickSelection__(qtVersion)
- __modifyAvailableTargets__(displayedPlatforms, requiredQtVersion, True)
- verifyKitCheckboxes(kits, displayedPlatforms)
- # FIXME: if QTBUG-35203 is fixed replace by triggering the shortcut for Back
- safeClickButton("Cancel")
+ def additionalFunc(displayedPlatforms, qtVersion):
+ requiredQtVersion = __createProjectHandleQtQuickSelection__(qtVersion)
+ __modifyAvailableTargets__(displayedPlatforms, requiredQtVersion, True)
+ handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
+ additionalFunc, qtVersion)
# are there more Quick combinations - then recreate this project
if counter < len(qtVersionsForQuick) - 1:
displayedPlatforms = __createProject__(category, template)
continue
elif template == "Qt Quick Controls 2 Application": # needs a Qt5.7
- clickButton(waitForObject(":Next_QPushButton")) # ignore this details page for now
- verifyKitCheckboxes(kits, displayedPlatforms)
- safeClickButton("Cancel")
+ def additionalFunc(displayedPlatforms):
+ clickButton(waitForObject(":Next_QPushButton")) # ignore this details page for now
+ handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms, additionalFunc)
continue
elif template.startswith("Plain C"):
- for counter, buildSystem in enumerate(availableBuildSystems):
- combo = "{name='BuildSystem' type='Utils::TextFieldComboBox' visible='1'}"
- selectFromCombo(combo, buildSystem)
- clickButton(waitForObject(":Next_QPushButton"))
- verifyKitCheckboxes(kits, displayedPlatforms)
- # FIXME: if QTBUG-35203 is fixed replace by triggering the shortcut for Back
- safeClickButton("Cancel")
- if counter < len(availableBuildSystems) - 1:
- displayedPlatforms = __createProject__(category, template)
+ handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms)
continue
- verifyKitCheckboxes(kits, displayedPlatforms)
- safeClickButton("Cancel")
+ handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms)
invokeMenuItem("File", "Exit")
@@ -125,6 +117,35 @@ def verifyKitCheckboxes(kits, displayedPlatforms):
test.fail("Found unexpected additional kit(s) %s on 'Kit Selection' page."
% str(availableCheckboxes))
+def handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
+ specialHandlingFunc = None, *args):
+ global availableBuildSystems
+ combo = "{name='BuildSystem' type='Utils::TextFieldComboBox' visible='1'}"
+ try:
+ waitForObject(combo, 2000)
+ skipBuildsystemChooser = False
+ except:
+ skipBuildsystemChooser = True
+
+ if skipBuildsystemChooser:
+ test.log("Wizard without build system support.")
+ if specialHandlingFunc:
+ specialHandlingFunc(displayedPlatforms, *args)
+ verifyKitCheckboxes(kits, displayedPlatforms)
+ safeClickButton("Cancel")
+ return
+
+ for counter, buildSystem in enumerate(availableBuildSystems):
+ test.log("Using build system '%s'" % buildSystem)
+ selectFromCombo(combo, buildSystem)
+ clickButton(waitForObject(":Next_QPushButton"))
+ if specialHandlingFunc:
+ specialHandlingFunc(displayedPlatforms, *args)
+ verifyKitCheckboxes(kits, displayedPlatforms)
+ safeClickButton("Cancel")
+ if counter < len(availableBuildSystems) - 1:
+ displayedPlatforms = __createProject__(category, template)
+
def __createProject__(category, template):
def safeGetTextBrowserText():
try: