forked from qt-creator/qt-creator
Squish: Adapt to changed UI
Change-Id: Ie25ba8a72b7fd93f60f04303ed223e7cdf2406af Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
:Go to slot.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Go to slot_QDialog'}
|
||||
:Go to slot.Select signal_QGroupBox {name='groupBox' title='Select signal' type='QGroupBox' visible='1' window=':Go to slot_QDialog'}
|
||||
:Go to slot_QDialog {name='SelectSignalDialog' type='QDialog' visible='1' windowTitle='Go to slot'}
|
||||
:Help Widget_Help::Internal::HelpWidget {type='Help::Internal::HelpWidget' unnamed='1' visible='1' windowTitle?='Help -*'}
|
||||
:Help Widget_Help::Internal::HelpWidget {type='Help::Internal::HelpWidget' unnamed='1' visible='1' windowTitle?='Help*'}
|
||||
:Hits_QLabel {text~='\\\\d+ - \\\\d+ of \\\\d+ Hits' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Hits_QResultWidget {aboveWidget=':Hits_QLabel' type='QResultWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:JsonWizard_ProjectExplorer::JsonFieldPage {type='ProjectExplorer::JsonFieldPage' unnamed='1' visible='1' window=':New_ProjectExplorer::JsonWizard'}
|
||||
|
@@ -31,9 +31,9 @@ def openQbsProject(projectPath):
|
||||
def openQmakeProject(projectPath, targets=Targets.desktopTargetClasses(), fromWelcome=False):
|
||||
cleanUpUserFiles(projectPath)
|
||||
if fromWelcome:
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton('Open')
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Open Project...')
|
||||
if not all((wsButtonFrame, wsButtonLabel)):
|
||||
test.fatal("Could not find 'Open' button on Welcome Page.")
|
||||
test.fatal("Could not find 'Open Project...' button on Welcome Page.")
|
||||
return []
|
||||
mouseClick(wsButtonLabel)
|
||||
else:
|
||||
@@ -83,10 +83,10 @@ def openCmakeProject(projectPath, buildDir):
|
||||
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")
|
||||
test.fatal("'Create Project...' on Welcome screen only handles projects nowadays.")
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton("Create Project...")
|
||||
if not all((wsButtonFrame, wsButtonLabel)):
|
||||
test.fatal("Could not find 'New' button on Welcome Page")
|
||||
test.fatal("Could not find 'Create Project...' button on Welcome Page")
|
||||
return []
|
||||
mouseClick(wsButtonLabel)
|
||||
elif isProject:
|
||||
|
@@ -41,8 +41,9 @@ def __getWelcomeScreenButtonHelper__(buttonLabel, widgetWithQFrames, isUrlButton
|
||||
return None, None
|
||||
|
||||
def getWelcomeScreenSideBarButton(buttonLabel, isUrlButton = False):
|
||||
sideBar = waitForObject("{type='Welcome::Internal::SideBar' unnamed='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
sideBar = waitForObject("{container={type='Welcome::Internal::SideArea' unnamed='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'} type='QWidget' "
|
||||
"unnamed='1'}")
|
||||
return __getWelcomeScreenButtonHelper__(buttonLabel, sideBar, isUrlButton)
|
||||
|
||||
def getWelcomeScreenMainButton(buttonLabel):
|
||||
|
@@ -75,13 +75,15 @@ def main():
|
||||
return
|
||||
|
||||
switchToSubMode('Projects')
|
||||
typePropDet = (("QPushButton", "Get Started Now", "Get Started Now button"),
|
||||
("QTreeView", "Sessions", "Sessions section"),
|
||||
typePropDet = (("QTreeView", "Sessions", "Sessions section"),
|
||||
("SessionModelIndex", ("default", False), "default session listed"),
|
||||
("QTreeView", "Recent Projects", "Projects section")
|
||||
)
|
||||
checkTypeAndProperties(typePropDet)
|
||||
|
||||
getStartedF, getStartedL = getWelcomeScreenSideBarButton("Get Started")
|
||||
test.verify(getStartedF is not None and getStartedL is not None, "'Get Started' button found")
|
||||
|
||||
# select "Create Project" and try to create a new project
|
||||
createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True)
|
||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||
|
@@ -42,10 +42,10 @@ def handlePackagingMessageBoxes():
|
||||
|
||||
def openExample(examplesLineEdit, input, exampleRegex, exampleName):
|
||||
replaceEditorContent(examplesLineEdit, input)
|
||||
tableView = waitForObject("{type='QTableView' unnamed='1' visible='1' "
|
||||
listView = waitForObject("{type='QListView' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
waitFor('findExampleOrTutorial(tableView, exampleRegex) is not None', 3000)
|
||||
example = findExampleOrTutorial(tableView, exampleRegex, True)
|
||||
waitFor('findExampleOrTutorial(listView, exampleRegex) is not None', 3000)
|
||||
example = findExampleOrTutorial(listView, exampleRegex, True)
|
||||
if test.verify(example is not None, "Verifying: Example (%s) is shown." % exampleName):
|
||||
mouseClick(example)
|
||||
handlePackagingMessageBoxes()
|
||||
@@ -67,7 +67,7 @@ def main():
|
||||
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
|
||||
addHelpDocumentation(qchs)
|
||||
setFixedHelpViewer(HelpViewer.HELPMODE)
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started')
|
||||
if not test.verify(all((wsButtonFrame, wsButtonLabel)),
|
||||
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
|
||||
test.fatal("Something's wrong - leaving test.")
|
||||
@@ -75,7 +75,7 @@ def main():
|
||||
return
|
||||
# select "Examples" topic
|
||||
switchToSubMode('Examples')
|
||||
expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'",
|
||||
expect = (("QListView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'",
|
||||
"examples list"),
|
||||
("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"),
|
||||
("QComboBox", "currentText~='.*Qt.*' visible='1'", "Qt version combo box"))
|
||||
@@ -88,9 +88,9 @@ def main():
|
||||
combo = waitForObject(search % (expect[2][0], expect[2][1]))
|
||||
test.log("Using examples from Kit %s." % str(combo.currentText))
|
||||
replaceEditorContent(examplesLineEdit, "qwerty")
|
||||
tableView = waitForObject(search % (expect[0][0], expect[0][1]))
|
||||
waitFor('findExampleOrTutorial(tableView, ".*") is None', 3000)
|
||||
example = findExampleOrTutorial(tableView, ".*", True)
|
||||
listView = waitForObject(search % (expect[0][0], expect[0][1]))
|
||||
waitFor('findExampleOrTutorial(listView, ".*") is None', 3000)
|
||||
example = findExampleOrTutorial(listView, ".*", True)
|
||||
test.verify(example is None, "Verifying: No example is shown.")
|
||||
|
||||
proFiles = map(lambda p: os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"),
|
||||
|
@@ -30,7 +30,7 @@ def main():
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started')
|
||||
if not test.verify(all((wsButtonFrame, wsButtonLabel)),
|
||||
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
|
||||
test.fatal("Something's wrong - leaving test.")
|
||||
@@ -44,16 +44,16 @@ def main():
|
||||
searchTutorials = waitForObject("{type='QLineEdit' placeholderText='Search in Tutorials...'}")
|
||||
mouseClick(searchTutorials)
|
||||
replaceEditorContent(searchTutorials, "qwerty")
|
||||
tableView = waitForObject("{type='QTableView' unnamed='1' visible='1' "
|
||||
listView = waitForObject("{type='QListView' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
waitFor('findExampleOrTutorial(tableView, ".*") is None', 3000)
|
||||
tutorial = findExampleOrTutorial(tableView, ".*", True)
|
||||
waitFor('findExampleOrTutorial(listView, ".*") is None', 3000)
|
||||
tutorial = findExampleOrTutorial(listView, ".*", True)
|
||||
test.verify(tutorial is None,
|
||||
"Verifying: 'Tutorials' topic is opened and nothing is shown.")
|
||||
bnr = "Help: Building and Running an Example"
|
||||
replaceEditorContent(searchTutorials, bnr.lower())
|
||||
waitFor('findExampleOrTutorial(tableView, "%s.*") is not None' % bnr, 3000)
|
||||
tutorial = findExampleOrTutorial(tableView, "%s.*" % bnr, True)
|
||||
waitFor('findExampleOrTutorial(listView, "%s.*") is not None' % bnr, 3000)
|
||||
tutorial = findExampleOrTutorial(listView, "%s.*" % bnr, True)
|
||||
test.verify(tutorial is not None, "Verifying: Expected Text tutorial is shown.")
|
||||
# clicking before documentation was updated will open the tutorial in browser
|
||||
progressBarWait(warn=False)
|
||||
@@ -67,8 +67,9 @@ def main():
|
||||
# check a demonstration video link
|
||||
mouseClick(searchTutorials)
|
||||
replaceEditorContent(searchTutorials, "embedded device")
|
||||
waitFor('findExampleOrTutorial(tableView, "Online: Qt for Device Creation.*") is not None', 3000)
|
||||
tutorial = findExampleOrTutorial(tableView, "Online: Qt for Device Creation.*", True)
|
||||
embeddedTutorial = "Online: How to install and set up Qt for Device Creation.*"
|
||||
waitFor('findExampleOrTutorial(listView, embeddedTutorial) is not None', 3000)
|
||||
tutorial = findExampleOrTutorial(listView, embeddedTutorial, True)
|
||||
test.verify(tutorial is not None,
|
||||
"Verifying: Link to the expected demonstration video exists.")
|
||||
# exit Qt Creator
|
||||
|
Reference in New Issue
Block a user