From 6ef4bd0a65572715f79231c4e1fa0ad2b43fd437 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 11 Jul 2023 14:51:53 +0200 Subject: [PATCH] Revert "SquishTests: Adapt test for Qml debugging" This patch had been valid when there had been another different issue of using qmlpuppet instead of qmlviewer or qmlscene. The other issue is fixed, so this patch is obsolete and now wrong. Change-Id: I291651256db2da1763d918c34811f03950cdb322 Reviewed-by: Marcus Tillmanns --- .../suite_debugger/tst_qml_locals/test.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py index 525f45f95fa..37ecb515cc6 100644 --- a/tests/system/suite_debugger/tst_qml_locals/test.py +++ b/tests/system/suite_debugger/tst_qml_locals/test.py @@ -48,9 +48,13 @@ def main(): earlyExit("Could not find expected Inspector tree inside Locals and Expressions.") return # reduce items to outer Rectangle object - items = items.getChild("QQmlApplicationEngine") + items = items.getChild("QQuickView") if items == None: - earlyExit("Could not find expected QQmlApplicationEngine 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: @@ -72,14 +76,13 @@ def main(): invokeMenuItem("File", "Exit") def __unfoldTree__(): - view = waitForObject(':Locals and Expressions_Debugger::Internal::WatchTreeView') # TODO inspect the qmlengine as well? - rootIndex = getQModelIndexStr("text='QQmlApplicationEngine'", + rootIndex = getQModelIndexStr("text='QQuickView'", ':Locals and Expressions_Debugger::Internal::WatchTreeView') - if not test.verify(view.isExpanded(waitForObject(rootIndex)), - "QQmlApplicationEngine should be expanded already."): - unfoldQModelIndex(rootIndex, False) - mainRect = getQModelIndexStr("text='Rectangle'", rootIndex) + 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: