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:
Robert Loehning
2018-07-10 13:57:16 +02:00
parent 626c08aaa5
commit e0f8779168
5 changed files with 15 additions and 14 deletions

View File

@@ -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')

View File

@@ -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"),

View File

@@ -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"),

View File

@@ -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"),

View File

@@ -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