on xenial help sign in
Test that dashcommunicator setCurrentScopeRequested closes the manage dash
commitb45bf6b7dd420a7066d708b8ecbf8137fead3241 authorAlbert Astals <albert.astals@canonical.com> dateWed 17 Dec 2014, 12:55 (12 years ago) parentf56cb82
1 file changed+17
tests/qmltests/Dash/tst_Dash.qml+17
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}