Make test survive severe slowness in the execution (e.g. Jenkins).
commitbbf9b64cc889a72bb61c21b99fa1d4b12e1202f5
authorDaniel d'Andrada <daniel.dandrada@canonical.com>
dateTue 30 Jul 2013, 12:32 (13 years ago)
parent3dbe6ab
Dash/DashContent.qml+1
@@ -114,6 +114,7 @@ Item {
114114 height: ListView.view.height
115115 asynchronous: true
116116 source: scopeMapper.map(scope.id)
117+ objectName: scope.id + " loader"
117118
118119 // these are needed for autopilot tests
119120 readonly property string scopeId: scope.id
tests/qmltests/tst_Shell.qml+7
@@ -56,6 +56,13 @@ Item {
5656
5757 function initTestCase() {
5858 swipeAwayGreeter();
59+
60+ // Ensure DashHome is loaded before continuing
61+ var dashContentList = findChild(shell, "dashContentList");
62+ waitForRendering(dashContentList);
63+ var homeLoader = findChild(dashContentList, "home.scope loader");
64+ verify(homeLoader);
65+ tryCompareFunction(function() {return homeLoader.item !== undefined;}, true);
5966 }
6067
6168 function cleanup() {