on xenial help sign in
adjust hud button test to also check if it correctly disappears when releasing outside the button
commitb613cc64d357a83e27be004982bfabc190cf193c authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 4 Sep 2013, 16:41 (13 years ago) parent1af5b57
1 file changed+4−2
tests/autopilot/unity8/shell/tests/test_hud.py+4−2
tests/autopilot/unity8/shell/tests/test_hud.py+4−2
@@ -49,9 +49,11 @@ class TestHud(UnityTestCase):
4949 hud_show_button
5050 )
5151 self.touch.press(swipe_coords.start_x, swipe_coords.start_y)
52− self.addCleanup(self.touch.release)
53− self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y)
52+ self.addCleanup(self._maybe_release_finger)
53+ self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y + hud_show_button.height);
5454 self.assertThat(hud_show_button.opacity, Eventually(Equals(1.0)))
55+ self.touch.release();
56+ self.assertThat(hud_show_button.opacity, Eventually(Equals(0.0)))
5557
5658 def test_show_hud_appears(self):
5759 """Releasing the touch on the 'show hud' button must display the hud.