From 8681608d8ba98a82ad029e861d741cd9954bef7f Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 25 Jan 2017 21:55:38 +0100 Subject: [PATCH] Squish: Clean up tst_qml_editor Should have been done in 4b4e5f69901f80ace0c0dba683771c2139d5c2b8 Change-Id: I0a747ea4bbf0ef02caaf31a14161dced9b4dd806 Reviewed-by: Christian Stenger --- tests/system/suite_editors/tst_qml_editor/test.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py index 7f3fedb5138..b751121a5e0 100644 --- a/tests/system/suite_editors/tst_qml_editor/test.py +++ b/tests/system/suite_editors/tst_qml_editor/test.py @@ -47,9 +47,6 @@ def main(): def testRenameId(): test.log("Testing rename of id") - navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}") - model = navTree.model() files = ["FocusCore.ContextMenu\\.qml", "FocusCore.GridMenu\\.qml", "FocusCore.ListMenu\\.qml", "focus\\.qml"] originalTexts = {} @@ -90,7 +87,7 @@ def testRenameId(): test.compare(originalText,formerTxt, "Comparing %s" % file.replace("FocusCore.","").replace("\\","")) invokeMenuItem("File","Save All") -def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expectedCount): +def __invokeFindUsage__(filename, line, additionalKeyPresses, expectedCount): openDocument("focus.QML.qml" + os.sep + "focus.%s" % filename) editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") if not placeCursorToLine(editor, line, True): @@ -104,19 +101,15 @@ def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expected def testFindUsages(): test.log("Testing find usage of an ID") - navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}") - __invokeFindUsage__(navTree, "focus\\.qml", "FocusScope\s*\{", [""], 6) + __invokeFindUsage__("focus\\.qml", "FocusScope\s*\{", [""], 6) test.log("Testing find usage of a property") clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) home = "" if platform.system() == "Darwin": home = "" - __invokeFindUsage__(navTree, "focus\\.qml", "id: window", ["", "", home], 26) + __invokeFindUsage__("focus\\.qml", "id: window", ["", "", home], 26) def testHovering(): - navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}") test.log("Testing hovering elements") openDocument("focus.QML.qml" + os.sep + "focus.focus\\.qml") editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")