Squish: Stabilize tst_HELP05

Change-Id: I9296dc577fac4ea06c7c8f482a44948ba327568f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Loehning
2017-11-28 15:29:37 +01:00
parent edcce9c1f3
commit 09f0d1a2ca
4 changed files with 17 additions and 5 deletions

View File

@@ -544,13 +544,24 @@ def iterateKits(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
else: else:
return result return result
# set "Always Start Full Help" in "Tools" -> "Options..." -> "Help" -> "General" # set a help viewer that will always be used, regardless of Creator's width
def setAlwaysStartFullHelp():
class HelpViewer:
HELPMODE, SIDEBYSIDE, EXTERNALWINDOW = range(3)
def setFixedHelpViewer(helpViewer):
invokeMenuItem("Tools", "Options...") invokeMenuItem("Tools", "Options...")
waitForObjectItem(":Options_QListView", "Help") waitForObjectItem(":Options_QListView", "Help")
clickItem(":Options_QListView", "Help", 5, 5, 0, Qt.LeftButton) clickItem(":Options_QListView", "Help", 5, 5, 0, Qt.LeftButton)
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "General") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "General")
selectFromCombo(":Startup.contextHelpComboBox_QComboBox", "Always Show in Help Mode") mode = "Always Show "
if helpViewer == HelpViewer.HELPMODE:
mode += "in Help Mode"
elif helpViewer == HelpViewer.SIDEBYSIDE:
mode += "Side-by-Side"
elif helpViewer == HelpViewer.EXTERNALWINDOW:
mode += "in External Window"
selectFromCombo(":Startup.contextHelpComboBox_QComboBox", mode)
clickButton(waitForObject(":Options.OK_QPushButton")) clickButton(waitForObject(":Options.OK_QPushButton"))
def removePackagingDirectory(projectPath): def removePackagingDirectory(projectPath):

View File

@@ -52,6 +52,7 @@ def main():
for p in Qt5Path.getPaths(Qt5Path.DOCS): for p in Qt5Path.getPaths(Qt5Path.DOCS):
qchs.append(os.path.join(p, "qtquick.qch")) qchs.append(os.path.join(p, "qtquick.qch"))
addHelpDocumentation(qchs) addHelpDocumentation(qchs)
setFixedHelpViewer(HelpViewer.SIDEBYSIDE)
# create qt quick application # create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp") createNewQtQuickApplication(tempDir(), "SampleApp")
editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")

View File

@@ -79,7 +79,7 @@ def main():
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
setAlwaysStartFullHelp() setFixedHelpViewer(HelpViewer.HELPMODE)
addCurrentCreatorDocumentation() addCurrentCreatorDocumentation()
buttonsAndState = {'Projects':True, 'Examples':False, 'Tutorials':False} buttonsAndState = {'Projects':True, 'Examples':False, 'Tutorials':False}

View File

@@ -66,7 +66,7 @@ def main():
for p in Qt5Path.getPaths(Qt5Path.DOCS): for p in Qt5Path.getPaths(Qt5Path.DOCS):
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)
setAlwaysStartFullHelp() setFixedHelpViewer(HelpViewer.HELPMODE)
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now') wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')
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."):