diff options
author | Christian Stenger <christian.stenger@qt.io> | 2020-03-12 13:20:13 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2020-03-13 12:35:45 +0000 |
commit | 38458c3e401d5fcafca6fa5b97fae7dd7c1865f4 (patch) | |
tree | 8f6cf4e6b049234877e9a3a7c2661e5e2445735e /tests | |
parent | 0b7970feb4c4098f41ba537c99b4d278935e38e7 (diff) | |
download | qt-creator-38458c3e401d5fcafca6fa5b97fae7dd7c1865f4.tar.gz |
Squish: Fix tst_qml_locals
The content of the locals and expressions had
changed as it nowadays provides information
on the qml engine as well.
Adapt the test accordingly.
Change-Id: Ib5fa96e3150206a374ac5e115e789cc3b983497b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/suite_debugger/tst_qml_locals/test.py | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py index 63516e8951..5f89fc8942 100644 --- a/tests/system/suite_debugger/tst_qml_locals/test.py +++ b/tests/system/suite_debugger/tst_qml_locals/test.py @@ -27,8 +27,6 @@ source("../../shared/qtcreator.py") source("Tree.py") def main(): - test.xfail("Skipping test. This must be rewritten for current kits.") - return if os.getenv("SYSTEST_OPENGL_MISSING") == "1": test.xfail("This test needs OpenGL - skipping...") return @@ -73,9 +71,13 @@ def main(): earlyExit("Could not find expected Inspector tree inside Locals and Expressions.") return # reduce items to outer Rectangle object - items = items.getChild("QQmlEngine") + items = items.getChild("QQuickView") if items == None: - earlyExit("Could not find expected QQmlEngine tree inside Locals and Expressions.") + earlyExit("Could not find expected QQuickView tree inside Locals and Expressions.") + return + items = items.getChild("QQuickRootItem") + if items == None: + earlyExit("Could not find expected QQuickRootItem tree inside Locals and Expressions.") return items = items.getChild("Rectangle") if items == None: @@ -97,23 +99,28 @@ def main(): invokeMenuItem("File", "Exit") def __unfoldTree__(): - rootIndex = getQModelIndexStr("text='QQmlEngine'", + # TODO inspect the qmlengine as well? + rootIndex = getQModelIndexStr("text='QQuickView'", ':Locals and Expressions_Debugger::Internal::WatchTreeView') - mainRect = getQModelIndexStr("text='Rectangle'", rootIndex) - unfoldQModelIndexIncludingProperties(mainRect) + unfoldQModelIndex(rootIndex, False) + quickRootItem = getQModelIndexStr("text='QQuickRootItem'", rootIndex) + unfoldQModelIndex(quickRootItem, False) + mainRect = getQModelIndexStr("text='Rectangle'", quickRootItem) + unfoldQModelIndex(mainRect) subItems = ["text='Rectangle'", "text='Rectangle' occurrence='2'", "text='Text'"] for item in subItems: - unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, mainRect)) + unfoldQModelIndex(getQModelIndexStr(item, mainRect)) -def unfoldQModelIndexIncludingProperties(indexStr): +def unfoldQModelIndex(indexStr, includingProperties=True): tv = waitForObject(':Locals and Expressions_Debugger::Internal::WatchTreeView') # HACK to avoid failing clicks tv.scrollToBottom() doubleClick(waitForObject(indexStr)) - propIndex = getQModelIndexStr("text='Properties'", indexStr) - # HACK to avoid failing clicks - tv.scrollToBottom() - doubleClick(waitForObject(propIndex)) + if includingProperties: + propIndex = getQModelIndexStr("text='Properties'", indexStr) + # HACK to avoid failing clicks + tv.scrollToBottom() + doubleClick(waitForObject(propIndex)) def fetchItems(index, valIndex, treeView): tree = Tree() |