@@ -17,11 +17,11 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20−import "../../qml/Panel"
20+import "../../../qml/Panel"
21import Unity.Indicators 0.1 as Indicators
21import Unity.Indicators 0.1 as Indicators
23−Item {
23+IndicatorTest {
24− id: shell
24+ id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(70)
26 height: units.gu(70)
@@ -29,14 +29,9 @@ Item {
29 Item { id: greeter }
29 Item { id: greeter }
30 Item { id: handle }
30 Item { id: handle }
32− Indicators.IndicatorsModel {
34− Component.onCompleted: load("test1")
37 MenuContent {
32 MenuContent {
38 id: menuContent
33 id: menuContent
39− indicatorsModel: indicatorsModel
34+ indicatorsModel: root.indicatorsModel
40 height: parent.height - 50
35 height: parent.height - 50
@@ -105,7 +100,7 @@ Item {
106 // Check that the correct menus are displayed for the requested item.
101 // Check that the correct menus are displayed for the requested item.
107 function test_show_menu() {
102 function test_show_menu() {
108− var menuCount = indicatorsModel.count;
103+ var menuCount = root.indicatorsModel.count;
109 verify(menuCount > 0, "Menu count should be greater than zero");
104 verify(menuCount > 0, "Menu count should be greater than zero");
111 var listView = menu_content_test.findChild(menuContent, "indicatorsContentListView")
106 var listView = menu_content_test.findChild(menuContent, "indicatorsContentListView")
@@ -124,14 +119,13 @@ Item {
125 // Tests QTBUG-30632 - asynchronous loader crashes when changing index quickly.
120 // Tests QTBUG-30632 - asynchronous loader crashes when changing index quickly.
126 function test_multi_activate() {
121 function test_multi_activate() {
127− var menuCount = indicatorsModel.count;
122+ var menuCount = root.indicatorsModel.count;
128 verify(menuCount > 0, "Menu count should be greater than zero");
123 verify(menuCount > 0, "Menu count should be greater than zero");
130 for (var i = 0; i < 100; i++) {
125 for (var i = 0; i < 100; i++) {
131 activate_content(i % menuCount);
126 activate_content(i % menuCount);
132 compare(menuContent.currentMenuIndex, i%menuCount);
127 compare(menuContent.currentMenuIndex, i%menuCount);