Commit 7f98c517 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Use global objects.map from inside HELP



Change-Id: I3df21777eb06e002de318c094741e3ff878a5f17
Reviewed-by: default avatarRobert Loehning <robert.loehning@nokia.com>
parent 5abe9e72
......@@ -8,6 +8,13 @@
:*Qt Creator_Core::Internal::FancyToolButton {occurrence='3' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Utils::FilterLineEdit {type='Utils::FilterLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Utils::IconButton {occurrence='4' type='Utils::IconButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:About Qt Creator_Core::Internal::VersionDialog {type='Core::Internal::VersionDialog' unnamed='1' visible='1' windowTitle='About Qt Creator'}
:Add Bookmark.ExpandBookmarksList_QToolButton {name='toolButton' text='+' type='QToolButton' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.New Folder_QPushButton {name='newFolderButton' text='New Folder' type='QPushButton' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.treeView_QExpandingLineEdit {container=':Add Bookmark.treeView_QTreeView' type='QExpandingLineEdit' unnamed='1' visible='1'}
:Add Bookmark.treeView_QTreeView {name='treeView' type='QTreeView' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark_BookmarkDialog {name='BookmarkDialog' type='BookmarkDialog' visible='1' windowTitle='Add Bookmark'}
:Behavior.Autocomplete common prefix_QCheckBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='partiallyComplete' text='Autocomplete common prefix' type='QCheckBox' visible='1'}
:Behavior.completionTrigger_QComboBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='completionTrigger' type='QComboBox' visible='1'}
:Breakpoints_Debugger::Internal::BreakTreeView {container=':DebugModeWidget.Breakpoints_QDockWidget' type='Debugger::Internal::BreakTreeView' unnamed='1' visible='1'}
......@@ -28,6 +35,8 @@
:Edit Environment_ProjectExplorer::EnvironmentItemsDialog {type='ProjectExplorer::EnvironmentItemsDialog' unnamed='1' visible='1' windowTitle='Edit Environment'}
:Failed to start application_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Failed to start application'}
:Generator:_QComboBox {buddy=':CMake Wizard.Generator:_QLabel' type='QComboBox' unnamed='1' visible='1'}
:Hits_QCLuceneResultWidget {aboveWidget=':Hits_QLabel' type='QCLuceneResultWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Hits_QLabel {text~='\\\\d+ - \\\\d+ of \\\\d+ Hits' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Kits_QTreeView {container=':qt_tabwidget_stackedwidget_QWidget' type='QTreeView' unnamed='1' visible='1'}
:Kits_QtVersion_QComboBox {container=':qt_tabwidget_stackedwidget_QWidget' occurrence='4' type='QComboBox' unnamed='1' visible='1'}
:New.frame_QFrame {name='frame' type='QFrame' visible='1' window=':New_Core::Internal::NewDialog'}
......@@ -42,23 +51,30 @@
:Options_QListView {type='QListView' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
:QML Debugging_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='QML Debugging'}
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Help_Search for:_QLineEdit {leftWidget=':Qt Creator.Search for:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.ReRun_QToolButton {toolTip='Re-run this run-configuration' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Replace All_QToolButton {name='replaceAllButton' text='Replace All' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Replace_QToolButton {name='replaceButton' text='Replace' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Search for:_QLabel {text='Search for:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.replaceEdit_Utils::FilterLineEdit {name='replaceEdit' type='Utils::FilterLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton {occurrence='3' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Bookmarks_TreeView {type='TreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CloseButton {type='CloseButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::CommandComboBox {type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' visible='1' windowTitle?='*Qt Creator'}
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Help::Internal::HelpViewer {type='Help::Internal::HelpViewer' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Issues_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
......
:About Qt Creator.Close_QPushButton {text='Close' type='QPushButton' unnamed='1' visible='1' window=':About Qt Creator_Core::Internal::VersionDialog'}
:About Qt Creator.Label {text?='*Qt Creator*' type='QLabel' unnamed='1' visible='1' window=':About Qt Creator_Core::Internal::VersionDialog'}
:About Qt Creator_Core::Internal::VersionDialog {type='Core::Internal::VersionDialog' unnamed='1' visible='1' windowTitle='About Qt Creator'}
:Add Bookmark.+_QToolButton {name='toolButton' text='+' type='QToolButton' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.New Folder_QPushButton {name='newFolderButton' text='New Folder' type='QPushButton' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.line_QFrame {name='line' type='QFrame' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.line_QMenu {aboveWidget=':Add Bookmark.line_QFrame' type='QMenu' unnamed='1' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark.treeView_QTreeView {name='treeView' type='QTreeView' visible='1' window=':Add Bookmark_BookmarkDialog'}
:Add Bookmark_BookmarkDialog {name='BookmarkDialog' type='BookmarkDialog' visible='1' windowTitle='Add Bookmark'}
:Folder 1.Folder 2_QModelIndex {column='0' container=':Sample.Folder 1_QModelIndex' text='Folder 2' type='QModelIndex'}
:Folder 2.Qt Creator : Building and Running an Example_QModelIndex {column='0' container=':Folder 1.Folder 2_QModelIndex' text?='QtCreator : Building and Running an Example*' type='QModelIndex'}
:Getting Started.Building and Running an Example_QModelIndex {column='0' container=':Qt Creator Manual*.Getting Started_QModelIndex' text='Building and Running an Example' type='QModelIndex'}
:Hits_QCLuceneResultWidget {aboveWidget=':Hits_QLabel' type='QCLuceneResultWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Hits_QLabel {text~='\\\\d+ - \\\\d+ of \\\\d+ Hits' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:New Folder.Qt Creator : Qt Creator Manual_QModelIndex {column='0' container=':Sample.New Folder_QModelIndex' text='QtCreator : Qt Creator Manual' type='QModelIndex'}
:Next_QPushButton {text~='(Next.*|Continue)' type='QPushButton' visible='1'}
:Options.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:Options.qt_tabwidget_tabbar_QTabBar {name='qt_tabwidget_tabbar' type='QTabBar' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:Options_Core::Internal::SettingsDialog {type='Core::Internal::SettingsDialog' unnamed='1' visible='1' windowTitle~='Options|Preferences'}
:Options_QListView {type='QListView' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:Qt Creator Manual QModelIndex {column='0' container=':Qt Creator_QHelpContentWidget' text~='Qt Creator Manual 2\\\\.[1-9]+[0-9]?\\\\.[1-9]+[0-9]?' type='QModelIndex'}
:Qt Creator Manual*.Getting Started_QModelIndex {column='0' container=':Qt Creator Manual QModelIndex' text='Getting Started' type='QModelIndex'}
:Qt Creator.+_QToolButton {text='+' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Search for:_QLabel {text='Search for:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Search for:_QLineEdit {leftWidget=':Qt Creator.Search for:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Search_QPushButton {text='Search' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.with all of the words:_QLabel {text='with <B>all</B> of the words:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.with all of the words:_QLineEdit {leftWidget=':Qt Creator.with all of the words:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.with at least one of the words:_QLabel {text='with <B>at least one</B> of the words:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.with at least one of the words:_QLineEdit {leftWidget=':Qt Creator.with at least one of the words:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.with exact phrase:_QLabel {text='with <B>exact phrase</B>:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.with exact phrase:_QLineEdit {leftWidget=':Qt Creator.with exact phrase:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.without the words:_QLabel {text='<B>without</B> the words:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.without the words:_QLineEdit {leftWidget=':Qt Creator.without the words:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.words similar to:_QLabel {text='words <B>similar</B> to:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.words similar to:_QLineEdit {leftWidget=':Qt Creator.words similar to:_QLabel' type='QLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::CommandComboBox {occurrence='2' type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::CommandComboBox_2 {type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1' windowTitle?='*Qt Creator'}
:Qt Creator_Help::Internal::HelpViewer {type='Help::Internal::HelpViewer' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QHelpSearchQueryWidget {type='QHelpSearchQueryWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_TreeView {type='TreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Reference Documentation_QModelIndex {column='0' container=':Qt Creator_QHelpContentWidget' text='Qt Reference Documentation' type='QModelIndex'}
:Sample.Folder 1_QModelIndex {column='0' container=':Sample_QModelIndex' text='Folder 1' type='QModelIndex'}
:Sample.New Folder_QModelIndex {column='0' container=':Sample_QModelIndex' text?='New Folder*' type='QModelIndex'}
:Sample_QModelIndex {column='0' container=':Qt Creator_TreeView' text='Sample' type='QModelIndex'}
:addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'}
:treeView.Sample_QModelIndex {column='0' container=':Add Bookmark.treeView_QTreeView' text='Sample' type='QModelIndex'}
:treeView.Yes_QPushButton {container=':Add Bookmark.treeView_QTreeView' text='Yes' type='QPushButton' unnamed='1' visible='1'}
:treeView_QExpandingLineEdit {container=':Add Bookmark.treeView_QTreeView' type='QExpandingLineEdit' unnamed='1' visible='1'}
AUT=qtcreator
CLASS=
CLASSPATH=
CWD=
ENVVARS=envvars
HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAP=../objects.map
TEST_CASES=tst_HELP02 tst_HELP04 tst_HELP05 tst_HELP06
VERSION=2
WRAPPERS=Qt
......@@ -3,7 +3,9 @@ source("../../shared/suites_qtta.py")
# test Qt Creator version information from file and dialog
def getQtCreatorVersionFromDialog():
chk = re.search("(?<=Qt Creator)\s\d+.\d+.\d+" , str(waitForObject(':About Qt Creator.Label' ).text))
chk = re.search("(?<=Qt Creator)\s\d+.\d+.\d+",
str(waitForObject("{text?='*Qt Creator*' type='QLabel' unnamed='1' visible='1' "
"window=':About Qt Creator_Core::Internal::VersionDialog'}").text))
try:
ver = chk.group(0).strip()
return ver
......@@ -37,9 +39,11 @@ def main():
waitForObject(":About Qt Creator_Core::Internal::VersionDialog")
actualVersion = getQtCreatorVersionFromDialog()
test.verify(actualVersion == expectedVersion,
"Verifying if version is good. Current version is: " + actualVersion + ", expected version is: " + expectedVersion)
"Verifying version. Current version is '%s', expected version is '%s'"
% (actualVersion, expectedVersion))
# close and verify about dialog closed
clickButton(waitForObject(":About Qt Creator.Close_QPushButton"))
clickButton(waitForObject("{text='Close' type='QPushButton' unnamed='1' visible='1' "
"window=':About Qt Creator_Core::Internal::VersionDialog'}"))
test.verify(checkIfObjectExists(":About Qt Creator_Core::Internal::VersionDialog", False),
"Verifying if About dialog closed.")
# exit qt creator
......@@ -47,4 +51,3 @@ def main():
# verify if qt creator closed properly
test.verify(checkIfObjectExists(":Qt Creator_Core::Internal::MainWindow", False),
"Verifying if Qt Creator closed.")
# no cleanup needed
......@@ -48,22 +48,25 @@ def main():
# switch to help mode
switchViewTo(ViewConstants.HELP)
# verify that search widget is accessible
mouseClick(waitForObjectItem(":Qt Creator_Core::Internal::CommandComboBox_2", "Search"))
test.verify(checkIfObjectExists(":Qt Creator_QHelpSearchQueryWidget"),
mouseClick(waitForObjectItem(":Qt Creator_Core::Internal::CommandComboBox", "Search"))
test.verify(checkIfObjectExists("{type='QHelpSearchQueryWidget' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"),
"Verifying search widget visibility.")
# try to search empty string
clickButton(waitForObject(":Qt Creator.Search_QPushButton"))
clickButton(waitForObject("{text='Search' type='QPushButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"))
progressBarWait()
test.verify(waitFor("noMatch in "
"str(waitForObject(':Hits_QCLuceneResultWidget').plainText)", 2000),
"Verifying if search did not match anything.")
# workaround for "endless waiting cursor"
mouseClick(waitForObject(":Qt Reference Documentation_QModelIndex"))
mouseClick(waitForObject("{column='0' container=':Qt Creator_QHelpContentWidget' "
"text='Qt Reference Documentation' type='QModelIndex'}"))
# try to search keyword from list
for searchKeyword,shouldFind in searchKeywordDictionary.items():
mouseClick(waitForObject(":Qt Creator.Search for:_QLineEdit"))
replaceEditorContent(":Qt Creator.Search for:_QLineEdit", searchKeyword)
type(waitForObject(":Qt Creator.Search for:_QLineEdit"), "<Return>")
mouseClick(waitForObject(":Qt Creator.Help_Search for:_QLineEdit"))
replaceEditorContent(":Qt Creator.Help_Search for:_QLineEdit", searchKeyword)
type(waitForObject(":Qt Creator.Help_Search for:_QLineEdit"), "<Return>")
progressBarWait()
if shouldFind:
test.verify(waitFor("re.match('[1-9]\d* - [1-9]\d* of [1-9]\d* Hits',"
......@@ -84,14 +87,22 @@ def main():
"str(waitForObject(':Hits_QCLuceneResultWidget').plainText)", 1000),
"Verifying if search did not match anything for: " + searchKeyword)
# advanced search - setup
clickButton(waitForObject(":Qt Creator.+_QToolButton"))
type(waitForObject(":Qt Creator.words similar to:_QLineEdit"), "deploy")
type(waitForObject(":Qt Creator.without the words:_QLineEdit"), "bookmark")
type(waitForObject(":Qt Creator.with exact phrase:_QLineEdit"), "sql in qt")
type(waitForObject(":Qt Creator.with all of the words:_QLineEdit"), "designer sql")
type(waitForObject(":Qt Creator.with at least one of the words:_QLineEdit"), "printing")
clickButton(waitForObject("{text='+' type='QToolButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"))
label = ("{text='%s' type='QLabel' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")
lineEdit = ("{leftWidget=%s type='QLineEdit' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")
labelTextsToSearchStr = {"words <B>similar</B> to:":"deploy",
"<B>without</B> the words:":"bookmark",
"with <B>exact phrase</B>:":"sql in qt",
"with <B>all</B> of the words:":"designer sql",
"with <B>at least one</B> of the words:":"printing"}
for labelText,searchStr in labelTextsToSearchStr.items():
type(waitForObject(lineEdit % (label % labelText)), searchStr)
# advanced search - do search
clickButton(waitForObject(":Qt Creator.Search_QPushButton"))
clickButton(waitForObject("{text='Search' type='QPushButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"))
progressBarWait()
# verify that advanced search results found
test.verify(waitFor("re.search('1 - 2 of 2 Hits',"
......@@ -109,8 +120,7 @@ def main():
test.verify("sql" in str(findObject(":Qt Creator_Help::Internal::HelpViewer").selectedText).lower(),
"sql advanced search result can be found")
# verify if simple search is properly disabled
test.verify(findObject(":Qt Creator.Search for:_QLineEdit").enabled == False,
test.verify(findObject(":Qt Creator.Help_Search for:_QLineEdit").enabled == False,
"Verifying if simple search is not active in advanced mode.")
# exit
invokeMenuItem("File", "Exit")
# no cleanup needed
......@@ -31,4 +31,3 @@ def main():
verifyInteractiveQMLHelp("MouseArea {", "QML MouseArea Element")
# exit
invokeMenuItem("File","Exit")
# no cleanup needed
......@@ -4,21 +4,32 @@ source("../../shared/suites_qtta.py")
# test bookmark functionality
def renameBookmarkFolder(view, item, newName):
openItemContextMenu(view, item, 5, 5, 0)
activateItem(waitForObjectItem(":Add Bookmark.line_QMenu", "Rename Folder"))
replaceEditorContent(waitForObject(":treeView_QExpandingLineEdit"), newName)
type(waitForObject(":treeView_QExpandingLineEdit"), "<Return>")
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1' "
"window=':Add Bookmark_BookmarkDialog'}", "Rename Folder"))
replaceEditorContent(waitForObject(":Add Bookmark.treeView_QExpandingLineEdit"), newName)
type(waitForObject(":Add Bookmark.treeView_QExpandingLineEdit"), "<Return>")
return
def getQModelIndexStr(textProperty, container):
if (container.startswith(":")):
container = "'%s'" % container
return ("{column='0' container=%s %s type='QModelIndex'}"
% (container, textProperty))
def main():
startApplication("qtcreator" + SettingsPath)
# goto help mode and click on topic
switchViewTo(ViewConstants.HELP)
doubleClick(":Qt Creator Manual QModelIndex", 5, 5, 0, Qt.LeftButton)
doubleClick(":Qt Creator Manual*.Getting Started_QModelIndex", 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObject(":Getting Started.Building and Running an Example_QModelIndex"), 5, 5, 0, Qt.LeftButton)
manualQModelIndex = getQModelIndexStr("text?='Qt Creator Manual *'",
":Qt Creator_QHelpContentWidget")
doubleClick(manualQModelIndex, 5, 5, 0, Qt.LeftButton)
gettingStartedQModelIndex = getQModelIndexStr("text='Getting Started'", manualQModelIndex)
doubleClick(gettingStartedQModelIndex, 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObject(getQModelIndexStr("text='Building and Running an Example'",
gettingStartedQModelIndex)), 5, 5, 0, Qt.LeftButton)
# open bookmarks window
clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton"))
clickButton(waitForObject(":Add Bookmark.+_QToolButton"))
clickButton(waitForObject(":Add Bookmark.ExpandBookmarksList_QToolButton"))
# create root bookmark directory
clickButton(waitForObject(":Add Bookmark.New Folder_QPushButton"))
# rename root bookmark directory
......@@ -30,54 +41,63 @@ def main():
clickButton(waitForObject(":Add Bookmark.New Folder_QPushButton"))
renameBookmarkFolder(bookmarkView, "Sample.Folder 1.New Folder*", "Folder 2")
clickButton(waitForObject(":Add Bookmark.OK_QPushButton"))
mouseClick(":Qt Creator Manual QModelIndex", 5, 5, 0, Qt.LeftButton)
mouseClick(manualQModelIndex, 5, 5, 0, Qt.LeftButton)
type(waitForObject(":Qt Creator_QHelpContentWidget"), "<Down>")
clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton"))
clickButton(waitForObject(":Add Bookmark.+_QToolButton"))
clickButton(waitForObject(":Add Bookmark.ExpandBookmarksList_QToolButton"))
# click on "Sample" and create new directory under it
mouseClick(waitForObject(":treeView.Sample_QModelIndex"))
mouseClick(waitForObject(getQModelIndexStr("text='Sample'", ":Add Bookmark.treeView_QTreeView")))
clickButton(waitForObject(":Add Bookmark.New Folder_QPushButton"))
clickButton(waitForObject(":Add Bookmark.OK_QPushButton"))
# choose bookmarks
mouseClick(waitForObjectItem(":Qt Creator_Core::Internal::CommandComboBox", "Bookmarks"))
# verify if all folders are created and bookmarks present
test.verify(checkIfObjectExists(":Sample_QModelIndex", verboseOnFail = True) and
checkIfObjectExists(":Sample.Folder 1_QModelIndex", verboseOnFail = True) and
checkIfObjectExists(":Folder 1.Folder 2_QModelIndex", verboseOnFail = True) and
checkIfObjectExists(":Folder 2.Qt Creator : Building and Running an Example_QModelIndex", verboseOnFail = True) and
checkIfObjectExists(":New Folder.Qt Creator : Qt Creator Manual_QModelIndex", verboseOnFail = True),
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*'",
folder2QModelIndex)
newFolderQModelIndex = getQModelIndexStr("text='New Folder'", sampleQModelIndex)
manualQModelIndex = getQModelIndexStr("text='QtCreator : Qt Creator Manual'",
newFolderQModelIndex)
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
checkIfObjectExists(folder1QModelIndex, verboseOnFail = True) and
checkIfObjectExists(folder2QModelIndex, verboseOnFail = True) and
checkIfObjectExists(bldRunQModelIndex, verboseOnFail = True) and
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
"Verifying if all folders and bookmarks are present")
mouseClick(waitForObject(":Qt Creator_TreeView"), 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView"), 5, 5, 0, Qt.LeftButton)
for i in range(6):
type(waitForObject(":Qt Creator_TreeView"), "<Right>")
type(waitForObject(":Qt Creator_TreeView"), "<Return>")
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),
"Verifying if first bookmark is opened")
mouseClick(waitForObject(":Folder 2.Qt Creator : Building and Running an Example_QModelIndex"))
type(waitForObject(":Qt Creator_TreeView"), "<Down>")
type(waitForObject(":Qt Creator_TreeView"), "<Right>")
type(waitForObject(":Qt Creator_TreeView"), "<Down>")
type(waitForObject(":Qt Creator_TreeView"), "<Return>")
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),
"Verifying if second bookmark is opened")
# delete previously created directory
clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton"))
clickButton(waitForObject(":Add Bookmark.+_QToolButton"))
clickButton(waitForObject(":Add Bookmark.ExpandBookmarksList_QToolButton"))
openItemContextMenu(waitForObject(":Add Bookmark.treeView_QTreeView"), "Sample.Folder 1", 5, 5, 0)
activateItem(waitForObjectItem(":Add Bookmark.line_QMenu", "Delete Folder"))
clickButton(waitForObject(":treeView.Yes_QPushButton"))
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1' "
"window=':Add Bookmark_BookmarkDialog'}", "Delete Folder"))
clickButton(waitForObject("{container=':Add Bookmark.treeView_QTreeView' text='Yes' "
"type='QPushButton' unnamed='1' visible='1'}"))#:treeView.Yes_QPushButton"))
# close bookmarks
clickButton(waitForObject(":Add Bookmark.OK_QPushButton"))
# choose bookmarks from command combobox (left top corner of qt creator)
# choose bookmarks from command combobox
mouseClick(waitForObject(":Qt Creator_Core::Internal::CommandComboBox"))
mouseClick(waitForObjectItem(":Qt Creator_Core::Internal::CommandComboBox", "Bookmarks"))
# verify if folders and bookmark deleted
test.verify(checkIfObjectExists(":Sample_QModelIndex", verboseOnFail = True) and
checkIfObjectExists(":Sample.Folder 1_QModelIndex ", shouldExist = False, verboseOnFail = True) and
checkIfObjectExists(":Folder 1.Folder 2_QModelIndex", shouldExist = False, verboseOnFail = True) and
checkIfObjectExists(":Folder 2.Qt Creator : Building and Running an Example_QModelIndex", shouldExist = False, verboseOnFail = True) and
checkIfObjectExists(":New Folder.Qt Creator : Qt Creator Manual_QModelIndex", verboseOnFail = True),
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
checkIfObjectExists(folder1QModelIndex, shouldExist = False, verboseOnFail = True) and
checkIfObjectExists(folder2QModelIndex, shouldExist = False, verboseOnFail = True) and
checkIfObjectExists(bldRunQModelIndex, shouldExist = False, verboseOnFail = True) and
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
"Verifying if folder 1 and folder 2 deleted including their bookmark")
# exit
invokeMenuItem("File", "Exit")
# no cleanup needed
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment