on xenial help sign in
Make the DashContent::test_mainNavigation test more stable Fixes: #1450809

Approved by: Michael Zanetti

commit0da2368e28088a1612df1fc3e857b34a2c48464f authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 18 May 2015, 23:04 (11 years ago) parent3e0c31f97e24ac
1 file changed+7−2
tests/qmltests/Dash/tst_DashContent.qml+7−2
tests/qmltests/Dash/tst_DashContent.qml+7−2
@@ -142,7 +142,7 @@ Item {
142142
143143 var startX = dashContentList.width/2;
144144 var startY = dashContentList.height/2;
145− touchFlick(dashContentList, startX - units.gu(2), startY, startX, startY);
145+ touchFlick(dashContentList, startX - units.gu(4), startY, startX, startY);
146146 tryCompare(categoryListView, "contentY", units.gu(15) - categoryListView.pageHeader.height);
147147 }
148148
@@ -153,7 +153,7 @@ Item {
153153
154154 tryCompare(scope, "status", Loader.Ready);
155155
156− var categoryListView = findChild(dashContentList, "categoryListView");
156+ var categoryListView = findChild(scope, "categoryListView");
157157 categoryListView.contentY = units.gu(10);
158158
159159 compare(dashContentList.currentItem.item.objectName, "MockScope1")
@@ -353,6 +353,8 @@ Item {
353353 compare(backButton.visible, true);
354354
355355 tryCompare(navigationList1.navigation, "loaded", true);
356+ tryCompare(navigationList1, "implicitHeight", navigationList1.itemHeight * 10);
357+ tryCompare(navigationList1, "height", navigationList1.implicitHeight);
356358 navigation = findChild(dashNavigationButton, "navigation1child2");
357359 mouseClick(navigation);
358360 compare(dashNavigationButton.showList, false);
@@ -386,6 +388,9 @@ Item {
386388 mouseClick(dashNavigationButton);
387389 compare(dashNavigationButton.showList, true);
388390 tryCompare(navigationListView.currentItem.navigation, "loaded", true);
391+ var navigationList0 = findChild(dashNavigationButton, "navigation0");
392+ tryCompare(navigationList0, "implicitHeight", navigationList0.itemHeight * 8);
393+ tryCompare(navigationList0, "height", navigationList0.implicitHeight);
389394 navigation = findChild(dashNavigationButton, "navigation0child2");
390395 mouseClick(navigation);
391396 compare(dashNavigationButton.showList, true);