forked from qt-creator/qt-creator
Squish: Update tst_HELP06
Change-Id: I4cfadb96ba27a1c95739d07f161e1579df9ce8ba Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -44,6 +44,12 @@ def invokeContextMenuItemOnBookmarkFolder(view, item, menuItem):
|
||||
activateItem(waitForObject("{aboveWidget=%s type='QMenu' unnamed='1' visible='1' "
|
||||
"window=':Add Bookmark_BookmarkDialog'}" % aboveWidget), menuItem)
|
||||
|
||||
def textForQtVersion(text):
|
||||
if isQt4Build:
|
||||
return "QtCreator : " + text
|
||||
else:
|
||||
return text + " | QtCreator"
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
if not startedWithoutPluginError():
|
||||
@@ -85,10 +91,10 @@ def main():
|
||||
sampleQModelIndex = getQModelIndexStr("text='Sample'", ":Qt Creator_Bookmarks_TreeView")
|
||||
folder1QModelIndex = getQModelIndexStr("text='Folder 1'", sampleQModelIndex)
|
||||
folder2QModelIndex = getQModelIndexStr("text='Folder 2'", folder1QModelIndex)
|
||||
bldRunQModelIndex = getQModelIndexStr("text?='QtCreator : Building and Running an Example*'",
|
||||
bldRunQModelIndex = getQModelIndexStr("text?='%s'" % textForQtVersion("Building and Running an Example*"),
|
||||
folder2QModelIndex)
|
||||
newFolderQModelIndex = getQModelIndexStr("text='New Folder'", sampleQModelIndex)
|
||||
manualQModelIndex = getQModelIndexStr("text='QtCreator : Qt Creator Manual'",
|
||||
manualQModelIndex = getQModelIndexStr("text='%s'" % textForQtVersion("Qt Creator Manual"),
|
||||
newFolderQModelIndex)
|
||||
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
|
||||
checkIfObjectExists(folder1QModelIndex, verboseOnFail = True) and
|
||||
@@ -100,14 +106,14 @@ def main():
|
||||
for i in range(6):
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Return>")
|
||||
test.verify("QtCreator : Building and Running an Example" in str(waitForObject(":Qt Creator_Help::Internal::HelpViewer").title),
|
||||
test.verify(textForQtVersion("Building and Running an Example") in str(waitForObject(":Qt Creator_Help::Internal::HelpViewer").title),
|
||||
"Verifying if first bookmark is opened")
|
||||
mouseClick(waitForObject(bldRunQModelIndex))
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Down>")
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Down>")
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Return>")
|
||||
test.verify("QtCreator : Qt Creator Manual" in str(waitForObject(":Qt Creator_Help::Internal::HelpViewer").title),
|
||||
test.verify(textForQtVersion("Qt Creator Manual") in str(waitForObject(":Qt Creator_Help::Internal::HelpViewer").title),
|
||||
"Verifying if second bookmark is opened")
|
||||
# delete previously created directory
|
||||
clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton"))
|
||||
|
||||
Reference in New Issue
Block a user