on xenial help sign in
Changed the behavior while turn to the first scope and added a test
91b6761handsome_feng
qml/Shell.qml+1−1
@@ -456,7 +456,7 @@ Item {
456 }
456 }
457
457
458 if (!greeter.locked) {
458 if (!greeter.locked) {
459− dash.setCurrentScope(0, false, true);
459+ dash.setCurrentScope(0, true, true);
460 if (ApplicationManager.focusedApplicationId != "unity8-dash") {
460 if (ApplicationManager.focusedApplicationId != "unity8-dash") {
461 ApplicationManager.requestFocusApplication("unity8-dash");
461 ApplicationManager.requestFocusApplication("unity8-dash");
462 launcher.fadeOut();
462 launcher.fadeOut();
tests/qmltests/tst_Shell.qml+42
@@ -460,6 +460,46 @@ Rectangle {
460 confirmLoggedIn(data.loggedIn)
460 confirmLoggedIn(data.loggedIn)
461 }
461 }
462
462
463+ function test_longLeftEdgeSwipeTakesToAppsAndResetSearchString() {
464+ loadShell("phone");
465+ swipeAwayGreeter();
466+
467+ dashCommunicatorSpy.clear();
468+
469+ //Small left swipe
470+ swipeFromLeftEdge(units.gu(25));
471+
472+ compare(dashCommunicatorSpy.count, 0);
473+
474+ //Long left swipe
475+ swipeFromLeftEdge(units.gu(30));
476+
477+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
478+
479+ compare(dashCommunicatorSpy.count, 1);
480+ compare(dashCommunicatorSpy.signalArguments[0][0], 0);
481+ compare(dashCommunicatorSpy.signalArguments[0][2], true)
482+ }
483+
484+ function test_ClickUbuntuIconInLauncherTakesToAppsAndResetSearchString() {
485+ loadShell("phone");
486+ swipeAwayGreeter();
487+ dragLauncherIntoView();
488+
489+ dashCommunicatorSpy.clear();
490+
491+ var launcher = findChild(shell, "launcher");
492+ var dashIcon = findChild(launcher, "dashItem");
493+ verify(dashIcon != undefined);
494+ mouseClick(dashIcon);
495+
496+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
497+
498+ compare(dashCommunicatorSpy.count, 1);
499+ compare(dashCommunicatorSpy.signalArguments[0][0], 0);
500+ compare(dashCommunicatorSpy.signalArguments[0][2], true)
501+ }
502+
463 function test_suspend() {
503 function test_suspend() {
464 loadShell("phone");
504 loadShell("phone");
465 swipeAwayGreeter();
505 swipeAwayGreeter();
@@ -1083,6 +1123,8 @@ Rectangle {
1083 var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
1123 var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
1084 dismissTimer.interval = 60 * 60 * 1000;
1124 dismissTimer.interval = 60 * 60 * 1000;
1085
1125
1126+ launcherShowDashHomeSpy.clear();
1127+
1086 dragLauncherIntoView();
1128 dragLauncherIntoView();
1087
1129
1088 // Emulate a tap with a finger, where the touch position drifts during the tap.
1130 // Emulate a tap with a finger, where the touch position drifts during the tap.