@@ -42,6 +42,7 @@ class TestHud(UnityTestCase):
42 self.main_window.get_greeter().swipe()
42 self.main_window.get_greeter().swipe()
43 window = self.main_window.get_qml_view()
43 window = self.main_window.get_qml_view()
44 hud_show_button = self.main_window.get_hud_show_button()
44 hud_show_button = self.main_window.get_hud_show_button()
45+ edge_drag_area = self.main_window.get_hud_edge_drag_area()
45 hud = self.main_window.get_hud()
46 hud = self.main_window.get_hud()
47 self._launch_test_app_from_app_screen()
48 self._launch_test_app_from_app_screen()
@@ -50,10 +51,15 @@ class TestHud(UnityTestCase):
51 hud_show_button
52 hud_show_button
54+ initialBottomMargin = int(hud_show_button.bottomMargin)
53 self.touch.press(swipe_coords.start_x, swipe_coords.start_y)
55 self.touch.press(swipe_coords.start_x, swipe_coords.start_y)
54 self.addCleanup(self._maybe_release_finger)
56 self.addCleanup(self._maybe_release_finger)
55− self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y + hud_show_button.height);
57+ self.touch._finger_move(swipe_coords.end_x, swipe_coords.start_y - int(edge_drag_area.distanceThreshold) - 5);
58+ self.assertThat(hud_show_button.opacity, Eventually(Equals(0.5)))
59+ self.assertThat(hud_show_button.bottomMargin, Eventually(Equals(initialBottomMargin)))
60+ self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y - hud_show_button.height);
56 self.assertThat(hud_show_button.opacity, Eventually(Equals(1.0)))
61 self.assertThat(hud_show_button.opacity, Eventually(Equals(1.0)))
62+# self.assertThat(hud_show_button.bottomMargin, Eventually(Equals(0.0)))
57 self.touch.release();
63 self.touch.release();
58 self.assertThat(hud_show_button.opacity, Eventually(Equals(0.0)))
64 self.assertThat(hud_show_button.opacity, Eventually(Equals(0.0)))
59 self.assertThat(hud.shown, Equals(False))
65 self.assertThat(hud.shown, Equals(False))