forked from qt-creator/qt-creator
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:
@@ -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))
|
||||
|
@@ -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
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user