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.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.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'}
|
: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_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'}
|
: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'}
|
: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):
|
def openQmakeProject(projectPath, targets=Targets.desktopTargetClasses(), fromWelcome=False):
|
||||||
cleanUpUserFiles(projectPath)
|
cleanUpUserFiles(projectPath)
|
||||||
if fromWelcome:
|
if fromWelcome:
|
||||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton('Open')
|
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Open Project...')
|
||||||
if not all((wsButtonFrame, wsButtonLabel)):
|
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 []
|
return []
|
||||||
mouseClick(wsButtonLabel)
|
mouseClick(wsButtonLabel)
|
||||||
else:
|
else:
|
||||||
@@ -83,10 +83,10 @@ def openCmakeProject(projectPath, buildDir):
|
|||||||
def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True):
|
def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True):
|
||||||
if fromWelcome:
|
if fromWelcome:
|
||||||
if not isProject:
|
if not isProject:
|
||||||
test.fatal("'New' on Welcome screen only handles projects nowadays.")
|
test.fatal("'Create Project...' on Welcome screen only handles projects nowadays.")
|
||||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton("New")
|
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton("Create Project...")
|
||||||
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 'Create Project...' button on Welcome Page")
|
||||||
return []
|
return []
|
||||||
mouseClick(wsButtonLabel)
|
mouseClick(wsButtonLabel)
|
||||||
elif isProject:
|
elif isProject:
|
||||||
|
@@ -41,8 +41,9 @@ def __getWelcomeScreenButtonHelper__(buttonLabel, widgetWithQFrames, isUrlButton
|
|||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
def getWelcomeScreenSideBarButton(buttonLabel, isUrlButton = False):
|
def getWelcomeScreenSideBarButton(buttonLabel, isUrlButton = False):
|
||||||
sideBar = waitForObject("{type='Welcome::Internal::SideBar' unnamed='1' "
|
sideBar = waitForObject("{container={type='Welcome::Internal::SideArea' unnamed='1' "
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
"window=':Qt Creator_Core::Internal::MainWindow'} type='QWidget' "
|
||||||
|
"unnamed='1'}")
|
||||||
return __getWelcomeScreenButtonHelper__(buttonLabel, sideBar, isUrlButton)
|
return __getWelcomeScreenButtonHelper__(buttonLabel, sideBar, isUrlButton)
|
||||||
|
|
||||||
def getWelcomeScreenMainButton(buttonLabel):
|
def getWelcomeScreenMainButton(buttonLabel):
|
||||||
|
@@ -75,13 +75,15 @@ def main():
|
|||||||
return
|
return
|
||||||
|
|
||||||
switchToSubMode('Projects')
|
switchToSubMode('Projects')
|
||||||
typePropDet = (("QPushButton", "Get Started Now", "Get Started Now button"),
|
typePropDet = (("QTreeView", "Sessions", "Sessions section"),
|
||||||
("QTreeView", "Sessions", "Sessions section"),
|
|
||||||
("SessionModelIndex", ("default", False), "default session listed"),
|
("SessionModelIndex", ("default", False), "default session listed"),
|
||||||
("QTreeView", "Recent Projects", "Projects section")
|
("QTreeView", "Recent Projects", "Projects section")
|
||||||
)
|
)
|
||||||
checkTypeAndProperties(typePropDet)
|
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
|
# select "Create Project" and try to create a new project
|
||||||
createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True)
|
createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True)
|
||||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||||
|
@@ -42,10 +42,10 @@ def handlePackagingMessageBoxes():
|
|||||||
|
|
||||||
def openExample(examplesLineEdit, input, exampleRegex, exampleName):
|
def openExample(examplesLineEdit, input, exampleRegex, exampleName):
|
||||||
replaceEditorContent(examplesLineEdit, input)
|
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'}")
|
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||||
waitFor('findExampleOrTutorial(tableView, exampleRegex) is not None', 3000)
|
waitFor('findExampleOrTutorial(listView, exampleRegex) is not None', 3000)
|
||||||
example = findExampleOrTutorial(tableView, exampleRegex, True)
|
example = findExampleOrTutorial(listView, exampleRegex, True)
|
||||||
if test.verify(example is not None, "Verifying: Example (%s) is shown." % exampleName):
|
if test.verify(example is not None, "Verifying: Example (%s) is shown." % exampleName):
|
||||||
mouseClick(example)
|
mouseClick(example)
|
||||||
handlePackagingMessageBoxes()
|
handlePackagingMessageBoxes()
|
||||||
@@ -67,7 +67,7 @@ def main():
|
|||||||
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
|
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
|
||||||
addHelpDocumentation(qchs)
|
addHelpDocumentation(qchs)
|
||||||
setFixedHelpViewer(HelpViewer.HELPMODE)
|
setFixedHelpViewer(HelpViewer.HELPMODE)
|
||||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')
|
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started')
|
||||||
if not test.verify(all((wsButtonFrame, wsButtonLabel)),
|
if not test.verify(all((wsButtonFrame, wsButtonLabel)),
|
||||||
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
|
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
|
||||||
test.fatal("Something's wrong - leaving test.")
|
test.fatal("Something's wrong - leaving test.")
|
||||||
@@ -75,7 +75,7 @@ def main():
|
|||||||
return
|
return
|
||||||
# select "Examples" topic
|
# select "Examples" topic
|
||||||
switchToSubMode('Examples')
|
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"),
|
"examples list"),
|
||||||
("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"),
|
("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"),
|
||||||
("QComboBox", "currentText~='.*Qt.*' visible='1'", "Qt version combo box"))
|
("QComboBox", "currentText~='.*Qt.*' visible='1'", "Qt version combo box"))
|
||||||
@@ -88,9 +88,9 @@ def main():
|
|||||||
combo = waitForObject(search % (expect[2][0], expect[2][1]))
|
combo = waitForObject(search % (expect[2][0], expect[2][1]))
|
||||||
test.log("Using examples from Kit %s." % str(combo.currentText))
|
test.log("Using examples from Kit %s." % str(combo.currentText))
|
||||||
replaceEditorContent(examplesLineEdit, "qwerty")
|
replaceEditorContent(examplesLineEdit, "qwerty")
|
||||||
tableView = waitForObject(search % (expect[0][0], expect[0][1]))
|
listView = waitForObject(search % (expect[0][0], expect[0][1]))
|
||||||
waitFor('findExampleOrTutorial(tableView, ".*") is None', 3000)
|
waitFor('findExampleOrTutorial(listView, ".*") is None', 3000)
|
||||||
example = findExampleOrTutorial(tableView, ".*", True)
|
example = findExampleOrTutorial(listView, ".*", True)
|
||||||
test.verify(example is None, "Verifying: No example is shown.")
|
test.verify(example is None, "Verifying: No example is shown.")
|
||||||
|
|
||||||
proFiles = map(lambda p: os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"),
|
proFiles = map(lambda p: os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"),
|
||||||
|
@@ -30,7 +30,7 @@ def main():
|
|||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')
|
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started')
|
||||||
if not test.verify(all((wsButtonFrame, wsButtonLabel)),
|
if not test.verify(all((wsButtonFrame, wsButtonLabel)),
|
||||||
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
|
"Verifying: Qt Creator displays Welcome Page with Getting Started."):
|
||||||
test.fatal("Something's wrong - leaving test.")
|
test.fatal("Something's wrong - leaving test.")
|
||||||
@@ -44,16 +44,16 @@ def main():
|
|||||||
searchTutorials = waitForObject("{type='QLineEdit' placeholderText='Search in Tutorials...'}")
|
searchTutorials = waitForObject("{type='QLineEdit' placeholderText='Search in Tutorials...'}")
|
||||||
mouseClick(searchTutorials)
|
mouseClick(searchTutorials)
|
||||||
replaceEditorContent(searchTutorials, "qwerty")
|
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'}")
|
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||||
waitFor('findExampleOrTutorial(tableView, ".*") is None', 3000)
|
waitFor('findExampleOrTutorial(listView, ".*") is None', 3000)
|
||||||
tutorial = findExampleOrTutorial(tableView, ".*", True)
|
tutorial = findExampleOrTutorial(listView, ".*", True)
|
||||||
test.verify(tutorial is None,
|
test.verify(tutorial is None,
|
||||||
"Verifying: 'Tutorials' topic is opened and nothing is shown.")
|
"Verifying: 'Tutorials' topic is opened and nothing is shown.")
|
||||||
bnr = "Help: Building and Running an Example"
|
bnr = "Help: Building and Running an Example"
|
||||||
replaceEditorContent(searchTutorials, bnr.lower())
|
replaceEditorContent(searchTutorials, bnr.lower())
|
||||||
waitFor('findExampleOrTutorial(tableView, "%s.*") is not None' % bnr, 3000)
|
waitFor('findExampleOrTutorial(listView, "%s.*") is not None' % bnr, 3000)
|
||||||
tutorial = findExampleOrTutorial(tableView, "%s.*" % bnr, True)
|
tutorial = findExampleOrTutorial(listView, "%s.*" % bnr, True)
|
||||||
test.verify(tutorial is not None, "Verifying: Expected Text tutorial is shown.")
|
test.verify(tutorial is not None, "Verifying: Expected Text tutorial is shown.")
|
||||||
# clicking before documentation was updated will open the tutorial in browser
|
# clicking before documentation was updated will open the tutorial in browser
|
||||||
progressBarWait(warn=False)
|
progressBarWait(warn=False)
|
||||||
@@ -67,8 +67,9 @@ def main():
|
|||||||
# check a demonstration video link
|
# check a demonstration video link
|
||||||
mouseClick(searchTutorials)
|
mouseClick(searchTutorials)
|
||||||
replaceEditorContent(searchTutorials, "embedded device")
|
replaceEditorContent(searchTutorials, "embedded device")
|
||||||
waitFor('findExampleOrTutorial(tableView, "Online: Qt for Device Creation.*") is not None', 3000)
|
embeddedTutorial = "Online: How to install and set up Qt for Device Creation.*"
|
||||||
tutorial = findExampleOrTutorial(tableView, "Online: Qt for Device Creation.*", True)
|
waitFor('findExampleOrTutorial(listView, embeddedTutorial) is not None', 3000)
|
||||||
|
tutorial = findExampleOrTutorial(listView, embeddedTutorial, True)
|
||||||
test.verify(tutorial is not None,
|
test.verify(tutorial is not None,
|
||||||
"Verifying: Link to the expected demonstration video exists.")
|
"Verifying: Link to the expected demonstration video exists.")
|
||||||
# exit Qt Creator
|
# exit Qt Creator
|
||||||
|
Reference in New Issue
Block a user