on xenial help sign in
test for flick when navigation open
commit3b123f339d3be5503ea50cc417c82d88a466d578 authorAlbert Astals <albert.astals@canonical.com> dateMon 5 Jan 2015, 17:08 (12 years ago) parentdc3ac5d
1 file changed+21
tests/qmltests/Dash/tst_DashContent.qml+21
tests/qmltests/Dash/tst_DashContent.qml+21
@@ -505,6 +505,27 @@ Item {
505505 compare(dashAltNavigationButton.showList, false);
506506 }
507507
508+ function test_navigationsSwipeToNextScope() {
509+ var dashContentList = findChild(dashContent, "dashContentList");
510+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
511+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
512+ tryCompare(dashNavigation, "visible", true);
513+ var dashNavigationButton = findChild(dashContentList.currentItem, "altNavigationButton");
514+ verify(dashNavigationButton, "Can't find navigation button");
515+
516+ compare(dashNavigationButton.showList, false);
517+ waitForRendering(dashNavigationButton);
518+ mouseClick(dashNavigationButton, 0, 0);
519+ compare(dashNavigationButton.showList, true);
520+
521+ mouseFlick(dashNavigationButton, dashNavigationButton.width, 0, 0, 0);
522+ compare(dashNavigationButton.showList, false);
523+
524+ var dashContentList = findChild(dashContent, "dashContentList");
525+ expectFail("", "should not change the parent list.");
526+ tryCompare(dashContentList, "currentIndex", 1);
527+ }
528+
508529 function test_searchHint() {
509530 var dashContentList = findChild(dashContent, "dashContentList");
510531 verify(dashContentList !== null);