forked from qt-creator/qt-creator
SquishTests: Allow designer test to progress further
Explicitly chose a newer kit as the kit we would use by default lacks some compiler features on Windows. This patch here only fixes the test crash when trying to access a disabled menu item due to cmake dropping out with error when parsing the project with the active kit. Drive by change: removed workaround for fixed bug. Change-Id: I783626f30d27ab1852536ae0d1f936ec8323feb8 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -139,7 +139,12 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion):
|
||||
# param buildSystem is a string holding the build system selected for the project
|
||||
# param checks turns tests in the function on if set to True
|
||||
# param available a list holding the available targets
|
||||
def __selectQtVersionDesktop__(buildSystem, checks, available=None):
|
||||
# param targets a list holding the wanted targets - defaults to all desktop targets if empty
|
||||
# returns checked targets
|
||||
def __selectQtVersionDesktop__(buildSystem, checks, available=None, targets=[]):
|
||||
if len(targets):
|
||||
wanted = targets
|
||||
else:
|
||||
wanted = Targets.desktopTargetClasses()
|
||||
checkedTargets = __chooseTargets__(wanted, available)
|
||||
if checks:
|
||||
@@ -162,6 +167,7 @@ def __selectQtVersionDesktop__(buildSystem, checks, available=None):
|
||||
verifyChecked(cbObject % ("Profile", objectMap.realName(detailsWidget)))
|
||||
clickButton(detailsButton)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
return checkedTargets
|
||||
|
||||
def __createProjectHandleLastPage__(expectedFiles=[], addToVersionControl="<None>", addToProject=None):
|
||||
if len(expectedFiles):
|
||||
@@ -205,8 +211,10 @@ def __getProjectFileName__(projectName, buildSystem):
|
||||
# param checks turns tests in the function on if set to True
|
||||
# param addToVersionControl selects the specified VCS from Creator's wizard
|
||||
# param buildSystem selects the specified build system from Creator's wizard
|
||||
# param targets specifies targets that should be checked
|
||||
# returns the checked targets
|
||||
def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<None>",
|
||||
buildSystem=None):
|
||||
buildSystem=None, targets=[]):
|
||||
template = "Qt Widgets Application"
|
||||
available = __createProjectOrFileSelectType__(" Application (Qt)", template)
|
||||
__createProjectSetNameAndPath__(path, projectName, checks)
|
||||
@@ -229,7 +237,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
|
||||
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
__createProjectHandleTranslationSelection__()
|
||||
__selectQtVersionDesktop__(buildSystem, checks, available)
|
||||
checkedTargets = __selectQtVersionDesktop__(buildSystem, checks, available, targets)
|
||||
|
||||
expectedFiles = []
|
||||
if checks:
|
||||
@@ -243,6 +251,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
|
||||
waitForProjectParsing()
|
||||
if checks:
|
||||
__verifyFileCreation__(path, expectedFiles)
|
||||
return checkedTargets
|
||||
|
||||
# Creates a Qt Console project
|
||||
# param path specifies where to create the project
|
||||
|
@@ -8,8 +8,13 @@ def main():
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
projectName = "DesignerTestApp"
|
||||
createProject_Qt_GUI(tempDir(), projectName,
|
||||
buildSystem="qmake" if JIRA.isBugStillOpen(28787) else "CMake")
|
||||
# explicitly chose new kit to avoid compiler issues on Windows
|
||||
targets = createProject_Qt_GUI(tempDir(), projectName, buildSystem="CMake",
|
||||
targets=[Targets.DESKTOP_6_2_4])
|
||||
if len(targets) != 1:
|
||||
earlyExit()
|
||||
return
|
||||
|
||||
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
||||
selectFromLocator("mainwindow.ui")
|
||||
dragAndDrop(waitForObject("{container=':qdesigner_internal::WidgetBoxCategoryListView'"
|
||||
|
Reference in New Issue
Block a user