Squish: Fix tst_qml_locals

Change-Id: I1667d966e2686dd3de8ef495d3db7b10d0b6aa5e
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-06-29 13:01:21 +02:00
parent 67371fcd3a
commit a32a9b3d2a

View File

@@ -91,8 +91,8 @@ def main():
checkForEmptyRows(items) checkForEmptyRows(items)
check = [[None, 0, {"Properties":1, "Rectangle":2, "Text":1}, {"width":"360", "height":"360"}], check = [[None, 0, {"Properties":1, "Rectangle":2, "Text":1}, {"width":"360", "height":"360"}],
["Text", 1, {"Properties":1}, {"text":"Check"}], ["Text", 1, {"Properties":1}, {"text":"Check"}],
["Rectangle", 1, {"Properties":1}, {"width":"50", "height":"50", "color":"#008000"}], ["Rectangle", 2, {"Properties":1}, {"width":"50", "height":"50", "color":"#008000"}],
["Rectangle", 2, {"Properties":1}, {"width":"100", "height":"100", "color":"#ff0000"}] ["Rectangle", 1, {"Properties":1}, {"width":"100", "height":"100", "color":"#ff0000"}]
] ]
for current in check: for current in check:
if current[0]: if current[0]:
@@ -108,23 +108,19 @@ def main():
def __unfoldTree__(): def __unfoldTree__():
rootIndex = getQModelIndexStr("text='Rectangle'", rootIndex = getQModelIndexStr("text='Rectangle'",
':Locals and Expressions_Debugger::Internal::WatchTreeView') ':Locals and Expressions_Debugger::Internal::WatchTreeView')
if JIRA.isBugStillOpen(14210):
doubleClick(waitForObject(rootIndex))
else:
test.warning("QTCREATORBUG-14210 is not open anymore. Can the workaround be removed?")
unfoldQModelIndexIncludingProperties(rootIndex) unfoldQModelIndexIncludingProperties(rootIndex)
if JIRA.isBugStillOpen(14210): subItems = ["text='Rectangle'", "text='Rectangle' occurrence='2'", "text='Text'"]
for item in ["text='Rectangle' occurrence='2'", "text='Rectangle' occurrence='2'", "text='Text'"]:
# both Rectangles will be clicked because they change their order
doubleClick(waitForObject(getQModelIndexStr(item, rootIndex)))
snooze(1)
subItems = ["text='Rectangle' occurrence='2'", "text='Rectangle'", "text='Text'"]
for item in subItems: for item in subItems:
unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, rootIndex)) unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, rootIndex))
def unfoldQModelIndexIncludingProperties(indexStr): def unfoldQModelIndexIncludingProperties(indexStr):
tv = waitForObject(':Locals and Expressions_Debugger::Internal::WatchTreeView')
# HACK to avoid failing clicks
tv.scrollToBottom()
doubleClick(waitForObject(indexStr)) doubleClick(waitForObject(indexStr))
propIndex = getQModelIndexStr("text='Properties'", indexStr) propIndex = getQModelIndexStr("text='Properties'", indexStr)
# HACK to avoid failing clicks
tv.scrollToBottom()
doubleClick(waitForObject(propIndex)) doubleClick(waitForObject(propIndex))
def fetchItems(index, valIndex, treeView): def fetchItems(index, valIndex, treeView):