@@ -42,6 +42,7 @@ class TestHud(UnityTestCase):
4242 self.main_window.get_greeter().swipe()
4343 window = self.main_window.get_qml_view()
4444 hud_show_button = self.main_window.get_hud_show_button()
45+ edge_drag_area = self.main_window.get_hud_edge_drag_area()
4546 hud = self.main_window.get_hud()
4647
4748 self._launch_test_app_from_app_screen()
@@ -50,10 +51,15 @@ class TestHud(UnityTestCase):
5051 window,
5152 hud_show_button
5253 )
54+ initialBottomMargin = int(hud_show_button.bottomMargin)
5355 self.touch.press(swipe_coords.start_x, swipe_coords.start_y)
5456 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);
5661 self.assertThat(hud_show_button.opacity, Eventually(Equals(1.0)))
62+# self.assertThat(hud_show_button.bottomMargin, Eventually(Equals(0.0)))
5763 self.touch.release();
5864 self.assertThat(hud_show_button.opacity, Eventually(Equals(0.0)))
5965 self.assertThat(hud.shown, Equals(False))