summaryrefslogtreecommitdiff
path: root/tests
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2012-07-29 23:24:59 -0400
committerTarmac <>2012-07-29 23:24:59 -0400
commitbe157c0789b3468e6ec158c95e6874b615bfd7ab (patch)
tree01281e540339273e55f8cd7b5b5ef3d76965674d /tests
parentfde2f5ce406aeb7c1b9753393a152c0f313db457 (diff)
parent0d0a94e7decf67ee9cd7da53a02f9c2219e5b7b5 (diff)
Fix typo in QuicklistView::RecvItemMouseDrag. It was the cause of the bug #1027955.. Fixes: https://bugs.launchpad.net/bugs/1027955. Approved by Marco Trevisan (TreviƱo).
(bzr r2527)
Diffstat (limited to 'tests')
-rw-r--r--tests/autopilot/unity/tests/test_quicklist.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/autopilot/unity/tests/test_quicklist.py b/tests/autopilot/unity/tests/test_quicklist.py
index b332cf82f..03d9747a2 100644
--- a/tests/autopilot/unity/tests/test_quicklist.py
+++ b/tests/autopilot/unity/tests/test_quicklist.py
@@ -347,3 +347,23 @@ class QuicklistKeyNavigationTests(UnityTestCase):
mouse_item.mouse_move_to()
self.assertThat(mouse_item.selected, Eventually(Equals(True)))
self.assertThat(self.quicklist.selected_item.id, Equals(mouse_item.id))
+
+ def test_moving_mouse_during_grab_select_correct_menuitem(self):
+ """Test that moving the mouse during grabbing selects the
+ correct menu item. See bug #1027955.
+ """
+ self.open_quicklist_with_mouse()
+ mouse_item = self.quicklist.selectable_items[0]
+ mouse_item.mouse_move_to()
+ self.assertThat(mouse_item.selected, Eventually(Equals(True)))
+
+ # Dragging the mouse horizontally doesn't change the selection
+ self.mouse.press()
+ self.addCleanup(self.mouse.release)
+ self.mouse.move(mouse_item.x + mouse_item.width - 10, mouse_item.y + mouse_item.height / 2)
+ self.assertThat(mouse_item.selected, Eventually(Equals(True)))
+
+ # Moving the mouse down selects the next item
+ mouse_item = self.quicklist.selectable_items[1]
+ mouse_item.mouse_move_to()
+ self.assertThat(mouse_item.selected, Eventually(Equals(True)))