on xenial help sign in
Make test_departments test more stable
297c5acAlbert Astals
tests/qmltests/Dash/tst_DashContent.qml+4−2
@@ -269,8 +269,10 @@ Item {
269 }
269 }
270
270
271 function test_departments() {
271 function test_departments() {
272− var dashDepartments = findChild(dashContent, "dashDepartments");
272+ var dashContentList = findChild(dashContent, "dashContentList");
273− compare(dashDepartments.visible, true);
273+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashDepartments") != null; }, true);
274+ var dashDepartments = findChild(dashContentList.currentItem, "dashDepartments");
275+ tryCompare(dashDepartments, "visible", true);
274 compare(dashDepartments.showList, false);
276 compare(dashDepartments.showList, false);
275 waitForRendering(dashDepartments);
277 waitForRendering(dashDepartments);
276 mouseClick(dashDepartments, 0, 0);
278 mouseClick(dashDepartments, 0, 0);