Commit 77a6b71f authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Use global objects.map from inside QMLS



Change-Id: I5c37408bc3a0e232d7f2a70e01db510725f99df1
Reviewed-by: default avatarRobert Loehning <robert.loehning@nokia.com>
parent f53ed6c4
......@@ -15,6 +15,8 @@
: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'}
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
:Add to Version Control_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Add to Version Control'}
: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'}
......@@ -32,6 +34,9 @@
:Debugger Toolbar.Continue_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Continue' type='QToolButton' unnamed='1' visible='1'}
:Debugger Toolbar.Exit Debugger_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Stop Debugger' type='QToolButton' unnamed='1' visible='1'}
:Debugger Toolbar.StatusText_Utils::StatusLabel {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' type='Utils::StatusLabel' unnamed='1'}
:Dialog.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'}
:Dialog.componentNameEdit_QLineEdit {name='componentNameEdit' type='Utils::ClassNameValidatingLineEdit' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'}
:Dialog_QmlJSEditor::Internal::ComponentNameDialog {name='QmlJSEditor__Internal__ComponentNameDialog' type='QmlJSEditor::Internal::ComponentNameDialog' visible='1' windowTitle='Move Component into Separate File'}
: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'}
......@@ -72,6 +77,7 @@
: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_Find::Internal::SearchResultTreeView {type='Find::Internal::SearchResultTreeView' 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'}
......
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
:Add to Version Control_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Add to Version Control'}
: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'}
:CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox {container=':qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget' name='groupBox' title='Behavior' type='QGroupBox' visible='1'}
:Dialog.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'}
:Dialog.componentNameEdit_QLineEdit {name='componentNameEdit' type='Utils::ClassNameValidatingLineEdit' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'}
:Dialog_QmlJSEditor::Internal::ComponentNameDialog {name='QmlJSEditor__Internal__ComponentNameDialog' type='QmlJSEditor::Internal::ComponentNameDialog' visible='1' windowTitle='Move Component into Separate File'}
:New Qt Quick Application.Add to version control:_QLabel {name='addToVersionControlLabel' text='Add to version control:' type='QLabel' visible='1'}
:Next_QPushButton {name='__qt__passive_wizardbutton1' 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_stackedwidget_QStackedWidget {name='qt_tabwidget_stackedwidget' type='QStackedWidget' 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.Clear_QToolButton {text='Clear' type='QToolButton' 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_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1'}
:Qt Creator_Find::Internal::SearchResultTreeView {type='Find::Internal::SearchResultTreeView' 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_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:addToVersionControlComboBox_QComboBox {buddy=':New Qt Quick Application.Add to version control:_QLabel' name='addToVersionControlComboBox' type='QComboBox' visible='1'}
:m_popupFrame_QListView {container=':m_popupFrame_TextEditor::GenericProposalWidget' type='QListView' unnamed='1' visible='1'}
:m_popupFrame_TextEditor::GenericProposalWidget {name='m_popupFrame' type='TextEditor::GenericProposalWidget' visible='1'}
:qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='CppTools__Internal__CompletionSettingsPage' type='QWidget' visible='1'}
AUT=qtcreator
CLASS=
CLASSPATH=
CWD=
ENVVARS=envvars
HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAP=../objects.map
TEST_CASES=tst_QMLS01 tst_QMLS02 tst_QMLS03 tst_QMLS04 tst_QMLS05 tst_QMLS06 tst_QMLS07 tst_QMLS08
VERSION=2
WRAPPERS=Qt
......@@ -14,7 +14,7 @@ def __beginTestSuggestions__(editorArea, lineText, textToType):
# verify whether suggestions makes sense for typed textToType
def verifySuggestions(textToType):
popup = findObject(":m_popupFrame_QListView")
popup = findObject(":popupFrame_Proposal_QListView")
model = popup.model()
for row in range(model.rowCount()):
index = model.index(row, 0)
......@@ -35,12 +35,12 @@ def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion):
if not __beginTestSuggestions__(editorArea, lineText, textToType):
return False
# check if suggestions are shown
test.verify(checkIfObjectExists(":m_popupFrame_QListView"),
test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView"),
"Verifying if suggestions in automatic mode are shown.")
# verify proposed suggestions
verifySuggestions(textToType)
# test if suggestion can be selected with keyToUseSuggestion
type(findObject(":m_popupFrame_QListView"), keyToUseSuggestion)
type(findObject(":popupFrame_Proposal_QListView"), keyToUseSuggestion)
# get text which was written by usage of suggestion
typedText = str(lineUnderCursor(editorArea)).strip()
# verify if expected text is written
......@@ -56,7 +56,7 @@ def testSuggestionsManual(lineText, textToType, expectedText):
if not __beginTestSuggestions__(editorArea, lineText, textToType):
return False
# wait if automatic popup displayed - if yes then fail, because we are in manual mode
test.verify(checkIfObjectExists(":m_popupFrame_QListView", False),
test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView", False),
"Verifying if suggestions in manual mode are properly not automatically shown")
# test if suggestion can be invoked manually
if platform.system() == "Darwin":
......@@ -64,12 +64,12 @@ def testSuggestionsManual(lineText, textToType, expectedText):
else:
type(editorArea, "<Ctrl+Space>")
# check if suggestions are shown
test.verify(checkIfObjectExists(":m_popupFrame_QListView"),
test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView"),
"Verifying if suggestions in manual mode are shown manually")
# verify proposed suggestions
verifySuggestions(textToType)
# test if suggestion can be used
type(findObject(":m_popupFrame_QListView"), "<Return>")
type(findObject(":popupFrame_Proposal_QListView"), "<Return>")
# get text which was written by usage of suggestion
typedText = str(lineUnderCursor(editorArea)).strip()
# verify if expected text is written
......@@ -106,4 +106,3 @@ def main():
testSuggestionsManual("Text {", "col", "color:")
# exit qt creator
saveAndExit()
......@@ -71,7 +71,7 @@ def main():
resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView")
test.verify(checkUsages(resultsView, expectedResults), "Verifying if usages were properly found using context menu.")
# clear previous results & prepare for next search
clickButton(waitForObject(":Qt Creator.Clear_QToolButton"))
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
mouseClick(editorArea, 5, 5, 0, Qt.LeftButton)
# 2. check usages using menu
# place cursor to component
......@@ -89,7 +89,7 @@ def main():
resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView")
test.verify(checkUsages(resultsView, expectedResults), "Verifying if usages were properly found using main menu.")
# clear previous results & prepare for next search
clickButton(waitForObject(":Qt Creator.Clear_QToolButton"))
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
mouseClick(editorArea, 5, 5, 0, Qt.LeftButton)
# 3. check usages using keyboard shortcut
# place cursor to component
......
......@@ -97,8 +97,7 @@ def testFindUsages():
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
__invokeFindUsage__(navTree, "focus\\.qml", "FocusScope\s*\{", ["<Down>"], 6)
test.log("Testing find usage of a property")
clickButton(waitForObject("{type='QToolButton' text='Clear' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"))
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
home = "<Home>"
if platform.system() == "Darwin":
home = "<Ctrl+Left>"
......
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