@@ -31,6 +31,12 @@ PanelTest {
31 target: clickThroughTester
31 target: clickThroughTester
36+ target: indicatorsMenu
37+ signalName: "showTapped"
34 MouseArea {
40 MouseArea {
35 id: clickThroughTester
41 id: clickThroughTester
36 anchors.fill: root
42 anchors.fill: root
@@ -140,6 +146,7 @@ PanelTest {
141 function cleanup() {
147 function cleanup() {
142 clickThroughSpy.clear();
148 clickThroughSpy.clear();
149+ showTappedSpy.clear();
145 function get_indicator_item(index) {
152 function get_indicator_item(index) {
@@ -321,5 +328,22 @@ PanelTest {
321 indicatorsMenu.available = true;
328 indicatorsMenu.available = true;
322 indicatorsMenu.hide();
329 indicatorsMenu.hide();
332+ // Ensure that showTapped is only signaled when the user hasn't moved
334+ // Prior to this, the user could press and drag down very fast but
335+ // still call showTapped
336+ function test_showTapped() {
337+ // Get the first indicator
338+ var firstItem = get_indicator_item(0);
339+ var firstItemMappedPosition = indicatorsMenu.mapFromItem(firstItem, firstItem.width/2, firstItem.height/2);
341+ touchFlick(indicatorsMenu,
342+ firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight / 2,
343+ firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight * 7,
344+ true /* beginTouch */, true /* endTouch */, 100, 2);
346+ verify(showTappedSpy.count === 0);