Squish: Adapt to changed UI

New File and New Project are nowadays separate menu entries.

Change-Id: I36c619d5a2eb4b5ac36bb25a20a1cb62f33493bb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2021-12-08 11:31:10 +01:00
parent 420b5bf541
commit 8039aa9ddb
3 changed files with 8 additions and 4 deletions

View File

@@ -79,13 +79,17 @@ def openCmakeProject(projectPath, buildDir):
# this list can be used in __chooseTargets__()
def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True):
if fromWelcome:
if not isProject:
test.fatal("'New' on Welcome screen only handles projects nowadays.")
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton("New")
if not all((wsButtonFrame, wsButtonLabel)):
test.fatal("Could not find 'New' button on Welcome Page")
return []
mouseClick(wsButtonLabel)
elif isProject:
invokeMenuItem("File", "New Project...")
else:
invokeMenuItem("File", "New File or Project...")
invokeMenuItem("File", "New File...")
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
if isProject:
mouseClick(waitForObjectItem(categoriesView, "Projects." + category))

View File

@@ -69,7 +69,7 @@ def main():
clickButton(waitForObject("{text='Yes' type='QPushButton' window=%s}" % mBox))
else:
# modify the current and the former file after AUT had lost focus and use 'Yes to All'
invokeMenuItem("File", "New File or Project...")
invokeMenuItem("File", "New Project...")
modifyExternally(currentFile)
modifyExternally(files[i - 1])
# clicking Cancel does not work when running inside Squish - mBox would not come up

View File

@@ -39,7 +39,7 @@ def main():
kits = getConfiguredKits()
test.log("Collecting potential project types...")
availableProjectTypes = []
invokeMenuItem("File", "New File or Project...")
invokeMenuItem("File", "New Project...")
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
catModel = categoriesView.model()
projects = catModel.index(0, 0)
@@ -146,7 +146,7 @@ def __createProject__(category, template):
except:
return ""
invokeMenuItem("File", "New File or Project...")
invokeMenuItem("File", "New Project...")
selectFromCombo(waitForObject(":New.comboBox_QComboBox"), "All Templates")
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
mouseClick(waitForObjectItem(categoriesView, "Projects." + category))