diff options
author | Robert Loehning <robert.loehning@qt.io> | 2019-04-24 18:42:25 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2019-05-20 16:30:38 +0000 |
commit | 9956d8d4611775da223a1778295b568bb209a978 (patch) | |
tree | 9404d2f4872cc4650b3086787572cbc41238d076 | |
parent | fc8dea883033b16527e183ae35d9a4392b98bfe1 (diff) |
Squish: Update tst_qtquick_creation
Task-number: QTCREATORBUG-20056
Change-Id: I5a7e239b9c65b32e2bc57dd594cc96bdda94b472
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | tests/system/shared/project.py | 17 | ||||
-rw-r--r-- | tests/system/suite_qtquick/tst_qtquick_creation/test.py | 20 |
2 files changed, 11 insertions, 26 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 8a0d69b222..a4be7f14d1 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -273,23 +273,14 @@ def createProject_Qt_Console(path, projectName, checks = True, buildSystem = Non if checks: __verifyFileCreation__(path, expectedFiles) -def createNewQtQuickApplication(workingDir, projectName = None, +def createNewQtQuickApplication(workingDir, projectName=None, targets=Targets.desktopTargetClasses(), minimumQtVersion="5.6", - withControls = False, fromWelcome = False, buildSystem = None): - if withControls: - template = "Qt Quick Application - Swipe" - else: - template = "Qt Quick Application - Empty" + template="Qt Quick Application - Empty", fromWelcome=False, + buildSystem=None): available = __createProjectOrFileSelectType__(" Application", template, fromWelcome) projectName = __createProjectSetNameAndPath__(workingDir, projectName) __handleBuildSystem__(buildSystem) - if withControls: - requiredQt = "5.7" - # TODO use parameter to define style to choose - test.log("Using default controls style") - clickButton(waitForObject(":Next_QPushButton")) - else: - requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion) + requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion) __modifyAvailableTargets__(available, requiredQt) checkedTargets = __chooseTargets__(targets, available) snooze(1) diff --git a/tests/system/suite_qtquick/tst_qtquick_creation/test.py b/tests/system/suite_qtquick/tst_qtquick_creation/test.py index 704d6e233b..d4bb433896 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation/test.py @@ -30,26 +30,20 @@ def main(): if not startedWithoutPluginError(): return - available = [("5.6", False), ("5.6", True)] + available = [("5.6", "Qt Quick Application - Empty", Targets.DESKTOP_5_6_1_DEFAULT), + ("5.10", "Qt Quick Application - Swipe", Targets.DESKTOP_5_10_1_DEFAULT)] - for qtVersion, controls in available: - targ = Targets.DESKTOP_5_6_1_DEFAULT + for qtVersion, appTemplate, targ in available: # using a temporary directory won't mess up a potentially existing workingDir = tempDir() checkedTargets = createNewQtQuickApplication(workingDir, targets=[targ], minimumQtVersion=qtVersion, - withControls = controls)[0] + template=appTemplate)[0] if len(checkedTargets) == 0: - if controls and qtVersion < "5.7": - test.xfail("Could not check wanted target.", "Quick Controls 2 wizard needs Qt5.7+") - else: - test.fatal("Could not check wanted target") + test.fatal("Could not check wanted target") continue - additionalText = '' - if controls: - additionalText = ' Controls ' - test.log("Building project Qt Quick%sApplication (%s)" - % (additionalText, Targets.getStringForTarget(targ))) + test.log("Building project %s (%s)" + % (appTemplate, Targets.getStringForTarget(targ))) invokeMenuItem("Build", "Build All") waitForCompile() if not checkCompile(): |