on xenial help sign in
Fix going to scopes when the Manage Dash is open Fixes: #1403464

Approved by: Michael Zanetti, PS Jenkins bot

commit94796fd0566d218b2214efff01c0e3b2c0d96409 authorAlbert Astals <albert.astals@canonical.com> dateFri 9 Jan 2015, 10:39 (12 years ago) parent7c02713b45bf6b
2 files changed+18−2
qml/Dash/Dash.qml+1−2 tests/qmltests/Dash/tst_Dash.qml+17
qml/Dash/Dash.qml+1−2
@@ -36,9 +36,8 @@ Showable {
3636 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
3737 // Close dash overview and nested temp scopes in it
3838 if (bottomEdgeController.progress != 0) {
39− bottomEdgeController.enableAnimation = window.active && !scopesOverview.showingNonFavoriteScope;
39+ bottomEdgeController.enableAnimation = window.active;
4040 bottomEdgeController.progress = 0;
41− scopesOverview.closeTempScope();
4241 }
4342 // Close normal temp scopes (e.g. App Store)
4443 if (scopeItem.scope) {
tests/qmltests/Dash/tst_Dash.qml+17
@@ -411,5 +411,22 @@ Item {
411411 tryCompare(dashContentList, "currentIndex", 2);
412412 compare(dashContentList.currentItem.scopeId, "MockScope5");
413413 }
414+
415+ function test_manage_dash_close_dashCommunicator() {
416+ var dashContentList = findChild(dash, "dashContentList");
417+ compare(dashContentList.currentIndex, 0);
418+ compare(dashContentList.currentItem.scopeId, "MockScope1");
419+
420+ // Show the manage dash
421+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
422+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
423+ tryCompare(bottomEdgeController, "progress", 1);
424+
425+ var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
426+ dashCommunicatorService.mockSetCurrentScope(1, true, false);
427+
428+ tryCompare(bottomEdgeController, "progress", 0);
429+ tryCompare(dashContentList, "currentIndex", 1)
430+ }
414431 }
415432}