@@ -17,11 +17,11 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
20−import "../../qml/Panel"
20+import "../../../qml/Panel"
2121import Unity.Indicators 0.1 as Indicators
2222
23−Item {
24− id: shell
23+IndicatorTest {
24+ id: root
2525 width: units.gu(40)
2626 height: units.gu(70)
2727
@@ -29,14 +29,9 @@ Item {
2929 Item { id: greeter }
3030 Item { id: handle }
3131
32− Indicators.IndicatorsModel {
33− id: indicatorsModel
34− Component.onCompleted: load("test1")
35− }
36−
3732 MenuContent {
3833 id: menuContent
39− indicatorsModel: indicatorsModel
34+ indicatorsModel: root.indicatorsModel
4035 height: parent.height - 50
4136 }
4237
@@ -105,7 +100,7 @@ Item {
105100
106101 // Check that the correct menus are displayed for the requested item.
107102 function test_show_menu() {
108− var menuCount = indicatorsModel.count;
103+ var menuCount = root.indicatorsModel.count;
109104 verify(menuCount > 0, "Menu count should be greater than zero");
110105
111106 var listView = menu_content_test.findChild(menuContent, "indicatorsContentListView")
@@ -124,14 +119,13 @@ Item {
124119
125120 // Tests QTBUG-30632 - asynchronous loader crashes when changing index quickly.
126121 function test_multi_activate() {
127− var menuCount = indicatorsModel.count;
122+ var menuCount = root.indicatorsModel.count;
128123 verify(menuCount > 0, "Menu count should be greater than zero");
129124
130125 for (var i = 0; i < 100; i++) {
131126 activate_content(i % menuCount);
132127 compare(menuContent.currentMenuIndex, i%menuCount);
133128 }
134− wait(100);
135129 }
136130 }
137131}