@@ -15,13 +15,15 @@
1515 */
1616
1717import QtQuick 2.0
18+import QtQuick.Window 2.0
1819import QtTest 1.0
1920import "../../../qml/Dash"
21+import "../../../qml/"
2022import Ubuntu.Components 0.1
2123import Unity.Test 0.1 as UT
2224
2325Item {
24− id: shell
26+ id: root
2527 width: units.gu(40)
2628 height: units.gu(80)
2729
@@ -38,6 +40,17 @@ Item {
3840 anchors.fill: parent
3941 }
4042
43+ Window {
44+ id: window
45+ width: units.gu(40)
46+ height: units.gu(80)
47+ Shell {
48+ id: shell
49+ anchors.fill: parent
50+ }
51+ Component.onCompleted: window.show();
52+ }
53+
4154 SignalSpy {
4255 id: spy
4356 }
@@ -265,6 +278,22 @@ Item {
265278 tryCompare(dashContentList, "currentIndex", 1)
266279 }
267280
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)
286+ var stopY = startY;
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");
291+
292+ var launcher = findChild(shell, "launcher");
293+ launcher.showDashHome()
294+ tryCompare(dashContentList, "currentIndex", 0)
295+ }
296+
268297 function test_setCurrentScopeClosesPreview() {
269298 var dashContent = findChild(dash, "dashContent");
270299 waitForRendering(dash)