aboutsummaryrefslogtreecommitdiffstats
path: root/tests/system/suite_debugger
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2019-02-13 14:44:43 +0100
committerChristian Stenger <christian.stenger@qt.io>2019-02-15 06:44:45 +0000
commitf3110a4c1c0ce4085f86b6dae227d35f9c4a35c8 (patch)
tree9ea8f9ce1ecb4c888fde24c3bd89ce993c60659b /tests/system/suite_debugger
parentf9b8f1471f499a1cd410288fd24693c3c7f36c3d (diff)
Squish: Fix tests for Qml locals view
Nowadays the locals and expression view displays the QQmlEngine as well, adapt tests accordingly. Change-Id: Ide6d3ae4e6dd8a136e44f196773a88a8aa29c702 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests/system/suite_debugger')
-rw-r--r--tests/system/suite_debugger/tst_qml_js_console/test.py13
-rw-r--r--tests/system/suite_debugger/tst_qml_locals/test.py11
2 files changed, 15 insertions, 9 deletions
diff --git a/tests/system/suite_debugger/tst_qml_js_console/test.py b/tests/system/suite_debugger/tst_qml_js_console/test.py
index e0f334b1d59..03c250dd6de 100644
--- a/tests/system/suite_debugger/tst_qml_js_console/test.py
+++ b/tests/system/suite_debugger/tst_qml_js_console/test.py
@@ -140,10 +140,11 @@ def main():
# start debugging
clickButton(fancyDebugButton)
waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView")
- rootIndex = getQModelIndexStr("text='Rectangle'",
+ rootIndex = getQModelIndexStr("text='QQmlEngine'",
":Locals and Expressions_Debugger::Internal::WatchTreeView")
- # make sure the items inside the root item are visible
- doubleClick(waitForObject(rootIndex))
+ # make sure the items inside the QQmlEngine's root are visible
+ mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
+ doubleClick(waitForObject(mainRect))
if not object.exists(":DebugModeWidget_Debugger::Internal::ConsoleView"):
invokeMenuItem("Window", "Output Panes", "Debugger Console")
progressBarWait()
@@ -154,19 +155,19 @@ def main():
("width=66", "66", "width"), ("anchors.centerIn", "<unnamed object>"),
("opacity", "1"), ("opacity = .1875", u"0.\u200b1875", "opacity")]
# check red inner Rectangle
- runChecks("text='Rectangle' occurrence='2'", rootIndex, checks)
+ runChecks("text='Rectangle' occurrence='2'", mainRect, checks)
checks = [("color", u"#\u200bff0000"), ("width", "100"), ("height", "100"),
("radius = Math.min(width, height) / 2", "50", "radius"),
("parent.objectName= 'mainRect'", "mainRect")]
# check green inner Rectangle
- runChecks("text='Rectangle'", rootIndex, checks)
+ runChecks("text='Rectangle'", mainRect, checks)
checks = [("color", u"#\u200b000000"), ("font.pointSize=14", "14", "font.pointSize"),
("font.bold", "false"), ("font.weight=Font.Bold", "75", "font.bold", "true"),
("rotation", "0"), ("rotation = 180", "180", "rotation")]
# check Text element
- runChecks("text='Text'", rootIndex, checks)
+ runChecks("text='Text'", mainRect, checks)
# extended check must be done separately
originalVal = useDebuggerConsole("x", None)
if originalVal:
diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py
index 696722f3268..0430c306c93 100644
--- a/tests/system/suite_debugger/tst_qml_locals/test.py
+++ b/tests/system/suite_debugger/tst_qml_locals/test.py
@@ -71,6 +71,10 @@ def main():
earlyExit("Could not find expected Inspector tree inside Locals and Expressions.")
return
# reduce items to outer Rectangle object
+ items = items.getChild("QQmlEngine")
+ if items == None:
+ earlyExit("Could not find expected QQmlEngine tree inside Locals and Expressions.")
+ return
items = items.getChild("Rectangle")
if items == None:
earlyExit("Could not find expected Rectangle tree inside Locals and Expressions.")
@@ -91,12 +95,13 @@ def main():
invokeMenuItem("File", "Exit")
def __unfoldTree__():
- rootIndex = getQModelIndexStr("text='Rectangle'",
+ rootIndex = getQModelIndexStr("text='QQmlEngine'",
':Locals and Expressions_Debugger::Internal::WatchTreeView')
- unfoldQModelIndexIncludingProperties(rootIndex)
+ mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
+ unfoldQModelIndexIncludingProperties(mainRect)
subItems = ["text='Rectangle'", "text='Rectangle' occurrence='2'", "text='Text'"]
for item in subItems:
- unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, rootIndex))
+ unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, mainRect))
def unfoldQModelIndexIncludingProperties(indexStr):
tv = waitForObject(':Locals and Expressions_Debugger::Internal::WatchTreeView')