on xenial help sign in
Changed the behavior while turn to the first scope and added a test
commit91b67613a37b735c782b8b6b67c6f6150400eb83 authorhandsome_feng <445865575@qq.com> dateWed 20 May 2015, 16:45 (11 years ago) parent85537e4
2 files changed+43−1
qml/Shell.qml+1−1 tests/qmltests/tst_Shell.qml+42
qml/Shell.qml+1−1
@@ -456,7 +456,7 @@ Item {
456456 }
457457
458458 if (!greeter.locked) {
459− dash.setCurrentScope(0, false, true);
459+ dash.setCurrentScope(0, true, true);
460460 if (ApplicationManager.focusedApplicationId != "unity8-dash") {
461461 ApplicationManager.requestFocusApplication("unity8-dash");
462462 launcher.fadeOut();
tests/qmltests/tst_Shell.qml+42
@@ -460,6 +460,46 @@ Rectangle {
460460 confirmLoggedIn(data.loggedIn)
461461 }
462462
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+
463503 function test_suspend() {
464504 loadShell("phone");
465505 swipeAwayGreeter();
@@ -1083,6 +1123,8 @@ Rectangle {
10831123 var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
10841124 dismissTimer.interval = 60 * 60 * 1000;
10851125
1126+ launcherShowDashHomeSpy.clear();
1127+
10861128 dragLauncherIntoView();
10871129
10881130 // Emulate a tap with a finger, where the touch position drifts during the tap.