@@ -57,8 +57,25 @@ PanelTest {
5757 minimizedPanelHeight: units.gu(3)
5858 expandedPanelHeight: units.gu(7)
5959 openedHeight: parent.height
60− indicatorsModel: root.indicatorsModel
60+ model: root.indicatorsModel
6161 shown: false
62+
63+ rowItemDelegate: Item {
64+ property int ownIndex: index
65+ objectName: model.identifier + "-panelItem"
66+
67+ implicitWidth: indicatorsMenu.expanded ? units.gu(5) : units.gu(3)
68+ height: parent.height
69+
70+ Rectangle {
71+ anchors {
72+ fill: parent
73+ margins: 2
74+ }
75+ color: "red"
76+ Label { anchors.centerIn: parent; text: ownIndex }
77+ }
78+ }
6279 }
6380 }
6481
@@ -205,8 +222,8 @@ PanelTest {
205222 // tests swiping on an indicator item activates the correct item.
206223 function test_swipeForCurrentItem()
207224 {
208− var indicatorItemRow = findChild(indicatorsMenu, "indicatorItemRow");
209− verify(indicatorItemRow !== null);
225+ var panelItemRow = findChild(indicatorsMenu, "panelItemRow");
226+ verify(panelItemRow !== null);
210227
211228 for (var i = 0; i < root.originalModelData.length; i++) {
212229 var indicatorItem = get_indicator_item(i);
@@ -218,10 +235,10 @@ PanelTest {
218235 mappedPosition.x, indicatorsMenu.openedHeight / 2,
219236 true /* beginTouch */, false /* endTouch */);
220237
221− tryCompare(indicatorItemRow, "currentItem", indicatorItem, undefined /*timeout, default */,
238+ tryCompare(panelItemRow, "currentItem", indicatorItem, undefined /*timeout, default */,
222239 "Incorrect item activated at position " + i);
223240
224− touchFlick(indicatorItemRow,
241+ touchFlick(panelItemRow,
225242 mappedPosition.x, indicatorsMenu.openedHeight / 2,
226243 mappedPosition.x, mappedPosition.y,
227244 false /* beginTouch */, true /* endTouch */);
@@ -238,8 +255,8 @@ PanelTest {
238255 indicatorsMenu.verticalVelocityThreshold = 0;
239256 verify(root.originalModelData.length >= 2);
240257
241− var indicatorItemRow = findChild(indicatorsMenu, "indicatorItemRow");
242− verify(indicatorItemRow !== null);
258+ var panelItemRow = findChild(indicatorsMenu, "panelItemRow");
259+ verify(panelItemRow !== null);
243260
244261 // Get the first indicator
245262 var firstItem = get_indicator_item(0);
@@ -251,12 +268,14 @@ PanelTest {
251268 firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight * 2,
252269 true /* beginTouch */, false /* endTouch */);
253270
254− tryCompare(indicatorItemRow, "currentItem", firstItem)
271+ tryCompare(panelItemRow, "currentItem", firstItem)
255272
256273 // next time position will have moved.
257274 var nextItem = get_indicator_item(1);
258275 var nextItemMappedPositionX = firstItemMappedPosition.x + firstItem.width;
259276
277+ firstItemMappedPosition = indicatorsMenu.mapFromItem(firstItem, firstItem.width/2, firstItem.height/2);
278+
260279 // 1) Flick mouse down to bottom
261280 touchFlick(indicatorsMenu,
262281 firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight * 2,
@@ -264,10 +283,10 @@ PanelTest {
264283 false /* beginTouch */, false /* endTouch */,
265284 units.gu(50) /* speed */, 5 /* iterations */); // more samples needed for accurate velocity
266285
267− tryCompare(indicatorItemRow, "currentItem", firstItem, undefined /* timeout, default */,
286+ tryCompare(panelItemRow, "currentItem", firstItem, undefined /* timeout, default */,
268287 "First indicator should still be the current item");
269288 // after waiting in the same spot with touch down, it should update to the next item.
270− tryCompare(indicatorItemRow, "currentItem", nextItem);
289+ tryCompare(panelItemRow, "currentItem", nextItem);
271290
272291 touchRelease(indicatorsMenu, nextItemMappedPositionX, indicatorsMenu.openedHeight / 3);
273292 }