@@ -34,6 +34,8 @@ class TestHud(UnityTestCase):
3434
3535 def test_show_hud_button_appears(self):
3636 """Swiping up while an app is active must show the 'show hud' button.
37+ The button must disappear not opening the HUD when releasing the
38+ mouse again somewhere on the screen except on the button itself.
3739
3840 """
3941 self.launch_unity()
@@ -49,9 +51,12 @@ class TestHud(UnityTestCase):
4951 hud_show_button
5052 )
5153 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)
54+ self.addCleanup(self._maybe_release_finger)
55+ self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y + hud_show_button.height);
5456 self.assertThat(hud_show_button.opacity, Eventually(Equals(1.0)))
57+ self.touch.release();
58+ self.assertThat(hud_show_button.opacity, Eventually(Equals(0.0)))
59+ self.assertThat(hud.shown, Equals(False))
5560
5661 def test_show_hud_appears(self):
5762 """Releasing the touch on the 'show hud' button must display the hud.