@@ -15,13 +15,15 @@
17import QtQuick 2.0
17import QtQuick 2.0
18+import QtQuick.Window 2.0
18import QtTest 1.0
19import QtTest 1.0
19import "../../../qml/Dash"
20import "../../../qml/Dash"
21+import "../../../qml/"
20import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
21import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24− id: shell
26+ id: root
25 width: units.gu(40)
27 width: units.gu(40)
26 height: units.gu(80)
28 height: units.gu(80)
@@ -38,6 +40,17 @@ Item {
38 anchors.fill: parent
40 anchors.fill: parent
51+ Component.onCompleted: window.show();
41 SignalSpy {
54 SignalSpy {
@@ -265,6 +278,22 @@ Item {
265 tryCompare(dashContentList, "currentIndex", 1)
278 tryCompare(dashContentList, "currentIndex", 1)
281+ function test_setShellHome() {
282+ var dashContentList = findChild(dash, "dashContentList");
283+ var startX = dash.width - units.gu(1);
284+ var startY = dash.height / 2;
285+ var stopX = units.gu(1)
287+ waitForRendering(dashContentList)
288+ mouseFlick(dash, startX, startY, stopX, stopY);
289+ mouseFlick(dash, startX, startY, stopX, stopY);
290+ compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
292+ var launcher = findChild(shell, "launcher");
293+ launcher.showDashHome()
294+ tryCompare(dashContentList, "currentIndex", 0)
268 function test_setCurrentScopeClosesPreview() {
297 function test_setCurrentScopeClosesPreview() {
269 var dashContent = findChild(dash, "dashContent");
298 var dashContent = findChild(dash, "dashContent");
270 waitForRendering(dash)
299 waitForRendering(dash)