forked from qt-creator/qt-creator
Squish: Update suite_WELP
This is a follow-up to 744279. Change-Id: I24485972b3a292952c653f2cfab1af198578fcc4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -59,6 +59,13 @@ def getWelcomeTreeView(treeViewLabel):
|
||||
except:
|
||||
return None
|
||||
|
||||
def switchToSubMode(subModeLabel):
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton(subModeLabel)
|
||||
frameAndLabelFound = all((wsButtonFrame, wsButtonLabel))
|
||||
if frameAndLabelFound:
|
||||
mouseClick(wsButtonLabel)
|
||||
return frameAndLabelFound
|
||||
|
||||
def findExampleOrTutorial(tableView, regex, verbose=False):
|
||||
model = tableView.model()
|
||||
children = __childrenOfType__(tableView, 'QModelIndex')
|
||||
|
@@ -82,7 +82,7 @@ def main():
|
||||
setFixedHelpViewer(HelpViewer.HELPMODE)
|
||||
addCurrentCreatorDocumentation()
|
||||
|
||||
buttonsAndState = {'Projects':True, 'Examples':False, 'Tutorials':False}
|
||||
buttonsAndState = {'Projects':False, 'Examples':True, 'Tutorials':False}
|
||||
for button, state in buttonsAndState.items():
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton(button)
|
||||
if test.verify(all((wsButtonFrame, wsButtonLabel)),
|
||||
@@ -90,6 +90,8 @@ def main():
|
||||
test.compare(buttonActive(wsButtonFrame), state,
|
||||
"Verifying whether '%s' button is active (%s)." % (button, state))
|
||||
|
||||
# select Projects and roughly check this
|
||||
switchToSubMode('Projects')
|
||||
for button in ['New Project', 'Open Project']:
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton(button)
|
||||
if test.verify(all((wsButtonFrame, wsButtonLabel)),
|
||||
@@ -130,9 +132,7 @@ def main():
|
||||
test.verify(wsButtonFrame is not None and wsButtonLabel is not None,
|
||||
"Verifying: Getting Started topic is being displayed.")
|
||||
# select Examples and roughly check them
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Examples')
|
||||
if all((wsButtonFrame, wsButtonLabel)):
|
||||
mouseClick(wsButtonLabel)
|
||||
switchToSubMode('Examples')
|
||||
test.verify(waitForButtonsState(False, True, False), "Buttons' states have changed.")
|
||||
|
||||
expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'",
|
||||
@@ -147,9 +147,7 @@ def main():
|
||||
"Verifying that at least one example is displayed.")
|
||||
|
||||
# select Tutorials and roughly check them
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Tutorials')
|
||||
if all((wsButtonFrame, wsButtonLabel)):
|
||||
mouseClick(wsButtonLabel)
|
||||
switchToSubMode('Tutorials')
|
||||
test.verify(waitForButtonsState(False, False, True), "Buttons' states have changed.")
|
||||
expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'",
|
||||
"tutorials list"),
|
||||
|
@@ -74,6 +74,7 @@ def main():
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
switchToSubMode('Projects')
|
||||
typePropDet = (("QPushButton", "Get Started Now", "Get Started Now button"),
|
||||
("QTreeView", "Sessions", "Sessions section"),
|
||||
("SessionModelIndex", ("default", False), "default session listed"),
|
||||
|
@@ -74,9 +74,7 @@ def main():
|
||||
invokeMenuItem("File", "Exit")
|
||||
return
|
||||
# select "Examples" topic
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Examples')
|
||||
if all((wsButtonFrame, wsButtonLabel)):
|
||||
mouseClick(wsButtonLabel)
|
||||
switchToSubMode('Examples')
|
||||
expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'",
|
||||
"examples list"),
|
||||
("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"),
|
||||
|
@@ -37,10 +37,7 @@ def main():
|
||||
invokeMenuItem("File", "Exit")
|
||||
return
|
||||
# select "Tutorials"
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Tutorials')
|
||||
if all((wsButtonFrame, wsButtonLabel)):
|
||||
mouseClick(wsButtonLabel)
|
||||
else:
|
||||
if not switchToSubMode('Tutorials'):
|
||||
test.fatal("Could not find Tutorials button - leaving test")
|
||||
invokeMenuItem("File", "Exit")
|
||||
return
|
||||
|
Reference in New Issue
Block a user