on xenial help sign in
extend findChild to also search invisible items (like animations)

This also reveals an issue in the Shell with a parent-child-loop, hence the debug prints

commit9a7d0b453382f3b6c8ad06b74ede0e800bdd7b9d authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 1 Aug 2013, 15:55 (13 years ago) parentd9848f6
2 files changed+11−2
tests/qmltests/tst_Shell.qml+9 tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
tests/qmltests/tst_Shell.qml+9
@@ -82,10 +82,13 @@ Item {
8282 The behavior of Dash on 3 should be the same as on 1.
8383 */
8484 function test_rightEdgeDrag() {
85+ print("fpppppppppppppppppppppppp1")
8586 checkRightEdgeDragWithNoRunningApps();
8687
88+ print("fpppppppppppppppppppppppp2")
8789 dragLauncherIntoView();
8890
91+ print("fpppppppppppppppppppppppp3")
8992 // Launch an app from the launcher
9093 tapOnAppIconInLauncher();
9194 waitUntilApplicationWindowIsFullyVisible();
@@ -178,10 +181,16 @@ Item {
178181 }
179182
180183 function dragLauncherIntoView() {
184+ print("baaaaaaaaaaaar1")
185+ print("trying to find child \"launcher\" from shell")
181186 var launcherPanel = findChild(shell, "launcherPanel");
187+ print("baaaaaaaaaaaar2")
182188 verify(launcherPanel.x = - launcherPanel.width);
189+ print("baaaaaaaaaaaar3")
183190 swipeFromLeftEdge();
191+ print("baaaaaaaaaaaar4")
184192 tryCompare(launcherPanel, "x", 0);
193+ print("baaaaaaaaaaaar5")
185194 }
186195
187196 function tapOnAppIconInLauncher() {
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -72,8 +72,8 @@ TestCase {
7272 // Find an object with the given name recursively, starting
7373 // at the given object "obj"
7474 function findChild(obj,objectName) {
75− for (var i in obj.children) {
76− var child = obj.children[i];
75+ for (var i in obj.data) {
76+ var child = obj.data[i];
7777 if (child.objectName === objectName) return child;
7878 var subChild = findChild(child,objectName);
7979 if (subChild !== undefined) return subChild;