on xenial help sign in
extend findChild to also search invisible items (like animations)
9a7d0b4Michael Zanetti
tests/qmltests/tst_Shell.qml+9
@@ -82,10 +82,13 @@ Item {
82 The behavior of Dash on 3 should be the same as on 1.
82 The behavior of Dash on 3 should be the same as on 1.
83 */
83 */
84 function test_rightEdgeDrag() {
84 function test_rightEdgeDrag() {
85+ print("fpppppppppppppppppppppppp1")
85 checkRightEdgeDragWithNoRunningApps();
86 checkRightEdgeDragWithNoRunningApps();
86
87
88+ print("fpppppppppppppppppppppppp2")
87 dragLauncherIntoView();
89 dragLauncherIntoView();
88
90
91+ print("fpppppppppppppppppppppppp3")
89 // Launch an app from the launcher
92 // Launch an app from the launcher
90 tapOnAppIconInLauncher();
93 tapOnAppIconInLauncher();
91 waitUntilApplicationWindowIsFullyVisible();
94 waitUntilApplicationWindowIsFullyVisible();
@@ -178,10 +181,16 @@ Item {
178 }
181 }
179
182
180 function dragLauncherIntoView() {
183 function dragLauncherIntoView() {
184+ print("baaaaaaaaaaaar1")
185+ print("trying to find child \"launcher\" from shell")
181 var launcherPanel = findChild(shell, "launcherPanel");
186 var launcherPanel = findChild(shell, "launcherPanel");
187+ print("baaaaaaaaaaaar2")
182 verify(launcherPanel.x = - launcherPanel.width);
188 verify(launcherPanel.x = - launcherPanel.width);
189+ print("baaaaaaaaaaaar3")
183 swipeFromLeftEdge();
190 swipeFromLeftEdge();
191+ print("baaaaaaaaaaaar4")
184 tryCompare(launcherPanel, "x", 0);
192 tryCompare(launcherPanel, "x", 0);
193+ print("baaaaaaaaaaaar5")
185 }
194 }
186
195
187 function tapOnAppIconInLauncher() {
196 function tapOnAppIconInLauncher() {
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -72,8 +72,8 @@ TestCase {
72 // Find an object with the given name recursively, starting
72 // Find an object with the given name recursively, starting
73 // at the given object "obj"
73 // at the given object "obj"
74 function findChild(obj,objectName) {
74 function findChild(obj,objectName) {
75− for (var i in obj.children) {
75+ for (var i in obj.data) {
76− var child = obj.children[i];
76+ var child = obj.data[i];
77 if (child.objectName === objectName) return child;
77 if (child.objectName === objectName) return child;
78 var subChild = findChild(child,objectName);
78 var subChild = findChild(child,objectName);
79 if (subChild !== undefined) return subChild;
79 if (subChild !== undefined) return subChild;