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__()
|
# this list can be used in __chooseTargets__()
|
||||||
def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True):
|
def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True):
|
||||||
if fromWelcome:
|
if fromWelcome:
|
||||||
|
if not isProject:
|
||||||
|
test.fatal("'New' on Welcome screen only handles projects nowadays.")
|
||||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton("New")
|
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton("New")
|
||||||
if not all((wsButtonFrame, wsButtonLabel)):
|
if not all((wsButtonFrame, wsButtonLabel)):
|
||||||
test.fatal("Could not find 'New' button on Welcome Page")
|
test.fatal("Could not find 'New' button on Welcome Page")
|
||||||
return []
|
return []
|
||||||
mouseClick(wsButtonLabel)
|
mouseClick(wsButtonLabel)
|
||||||
|
elif isProject:
|
||||||
|
invokeMenuItem("File", "New Project...")
|
||||||
else:
|
else:
|
||||||
invokeMenuItem("File", "New File or Project...")
|
invokeMenuItem("File", "New File...")
|
||||||
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
|
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
|
||||||
if isProject:
|
if isProject:
|
||||||
mouseClick(waitForObjectItem(categoriesView, "Projects." + category))
|
mouseClick(waitForObjectItem(categoriesView, "Projects." + category))
|
||||||
|
@@ -69,7 +69,7 @@ def main():
|
|||||||
clickButton(waitForObject("{text='Yes' type='QPushButton' window=%s}" % mBox))
|
clickButton(waitForObject("{text='Yes' type='QPushButton' window=%s}" % mBox))
|
||||||
else:
|
else:
|
||||||
# modify the current and the former file after AUT had lost focus and use 'Yes to All'
|
# 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(currentFile)
|
||||||
modifyExternally(files[i - 1])
|
modifyExternally(files[i - 1])
|
||||||
# clicking Cancel does not work when running inside Squish - mBox would not come up
|
# clicking Cancel does not work when running inside Squish - mBox would not come up
|
||||||
|
@@ -39,7 +39,7 @@ def main():
|
|||||||
kits = getConfiguredKits()
|
kits = getConfiguredKits()
|
||||||
test.log("Collecting potential project types...")
|
test.log("Collecting potential project types...")
|
||||||
availableProjectTypes = []
|
availableProjectTypes = []
|
||||||
invokeMenuItem("File", "New File or Project...")
|
invokeMenuItem("File", "New Project...")
|
||||||
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
|
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
|
||||||
catModel = categoriesView.model()
|
catModel = categoriesView.model()
|
||||||
projects = catModel.index(0, 0)
|
projects = catModel.index(0, 0)
|
||||||
@@ -146,7 +146,7 @@ def __createProject__(category, template):
|
|||||||
except:
|
except:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
invokeMenuItem("File", "New File or Project...")
|
invokeMenuItem("File", "New Project...")
|
||||||
selectFromCombo(waitForObject(":New.comboBox_QComboBox"), "All Templates")
|
selectFromCombo(waitForObject(":New.comboBox_QComboBox"), "All Templates")
|
||||||
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
|
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
|
||||||
mouseClick(waitForObjectItem(categoriesView, "Projects." + category))
|
mouseClick(waitForObjectItem(categoriesView, "Projects." + category))
|
||||||
|
Reference in New Issue
Block a user