forked from qt-creator/qt-creator
Squish: Adapt tst_HELP05 to changed template
Change-Id: I03973193b2a705af632fd8978b37873bde51006f Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -37,10 +37,12 @@ def verifyInteractiveQMLHelp(lineText, helpText):
|
|||||||
type(editorArea, homeKey)
|
type(editorArea, homeKey)
|
||||||
else:
|
else:
|
||||||
type(editorArea, homeKey)
|
type(editorArea, homeKey)
|
||||||
|
snooze(1)
|
||||||
# call help
|
# call help
|
||||||
type(editorArea, "<F1>")
|
type(editorArea, "<F1>")
|
||||||
test.verify(helpText in getHelpTitle(),
|
test.verify(waitFor('helpText in getHelpTitle()', 1000),
|
||||||
"Verifying if help is opened with documentation for '%s'." % helpText)
|
"Verifying if help is opened with documentation for '%s'.\nHelp title: %s"
|
||||||
|
% (helpText, getHelpTitle()))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
startApplication("qtcreator" + SettingsPath)
|
startApplication("qtcreator" + SettingsPath)
|
||||||
@@ -52,10 +54,15 @@ def main():
|
|||||||
addHelpDocumentation(qchs)
|
addHelpDocumentation(qchs)
|
||||||
# create qt quick application
|
# create qt quick application
|
||||||
createNewQtQuickApplication(tempDir(), "SampleApp")
|
createNewQtQuickApplication(tempDir(), "SampleApp")
|
||||||
|
editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
|
||||||
|
# add basic MouseArea item to check it afterwards
|
||||||
|
codelines = ['MouseArea {', 'anchors.fill: parent', 'onClicked: Qt.quit()']
|
||||||
|
if not addTestableCodeAfterLine(editorArea, 'title: qsTr("Hello World")', codelines):
|
||||||
|
saveAndExit()
|
||||||
|
return
|
||||||
|
invokeMenuItem("File", "Save All")
|
||||||
# verify Rectangle help
|
# verify Rectangle help
|
||||||
verifyInteractiveQMLHelp("Window {", "Window QML Type")
|
verifyInteractiveQMLHelp("Window {", "Window QML Type")
|
||||||
# go back to edit mode
|
|
||||||
switchViewTo(ViewConstants.EDIT)
|
|
||||||
# verify MouseArea help
|
# verify MouseArea help
|
||||||
verifyInteractiveQMLHelp("MouseArea {", "MouseArea QML Type")
|
verifyInteractiveQMLHelp("MouseArea {", "MouseArea QML Type")
|
||||||
# exit
|
# exit
|
||||||
|
|||||||
Reference in New Issue
Block a user