@@ -45,26 +45,6 @@ class TestHud(Unity8TestCase):
4545
4646 scenarios = _get_device_emulation_scenarios()
4747
48− def _launch_application_from_app_screen(self):
49− # find the first application and launch it.
50− # becuase launch_application on the desktop will launch it on the
51− # desktop.
52− dash = self.main_window.get_dash()
53− icon = dash.get_application_icon()
54− self.touch.tap_object(icon)
55−
56− # Ensure application is open
57− bottombar = self.main_window.get_bottombar()
58− self.assertThat(bottombar.applicationIsOnForeground, Eventually(Equals(True)))
59−
60− # Because some tests are manually manipulating the finger, we want to
61− # cleanup if the test fails, but we don't want to fail with an exception if
62− # we don't.
63− def _maybe_release_finger(self):
64− """Only release the finger if it is in fact down."""
65− if self.touch._touch_finger is not None:
66− self.touch.release()
67−
6848 def test_show_hud_button_appears(self):
6949 """Swiping up while an app is active must show the 'show hud' button."""
7050 self.launch_unity()
@@ -74,12 +54,7 @@ class TestHud(Unity8TestCase):
7454 hud_show_button = self.main_window.get_hud_show_button()
7555 hud = self.main_window.get_hud()
7656
77− # determine the swipe
7857 swipe_coords = self._get_hud_button_swipe_coords(window, hud_show_button)
79− # start_x = int(window.x + (window.width / 2))
80− # end_x = start_x
81− # start_y = window.y + (window.height -3)
82− # end_y = int(hud_show_button.y)
8358
8459 self._launch_application_from_app_screen()
8560
@@ -99,12 +74,7 @@ class TestHud(Unity8TestCase):
9974 hud_show_button = self.main_window.get_hud_show_button()
10075 hud = self.main_window.get_hud()
10176
102− # determine the swipe
10377 swipe_coords = self._get_hud_button_swipe_coords(window, hud_show_button)
104− # start_x = int(window.x + (window.width / 2))
105− # end_x = start_x
106− # start_y = window.y + (window.height -3)
107− # end_y = int(hud_show_button.y)
10878
10979 self._launch_application_from_app_screen()
11080
@@ -118,16 +88,6 @@ class TestHud(Unity8TestCase):
11888 self.touch.release()
11989 self.assertThat(hud.shown, Eventually(Equals(True)))
12090
121− # self.launch_unity()
122− # hud = self.main_window.get_hud()
123− # greeter = self.main_window.get_greeter()
124− # greeter.unlock()
125−
126− # self._launch_application_from_app_screen()
127−
128− # hud.show()
129− # self.assertThat(hud.shown, Eventually(Equals(True)))
130−
13191 # def test_show_hud_button_dont_open(self):
13292 # self.launch_unity()
13393 # hud_show_button = self.main_window.get_hud_show_button()
@@ -211,6 +171,31 @@ class TestHud(Unity8TestCase):
211171
212172 self.assertThat(hud.shown, Eventually(Equals(False)))
213173
174+ def _launch_application_from_app_screen(self):
175+ """Launches the camera app using the Dash UI.
176+
177+ This is becuase when testing on the desktop running
178+ self.launch_application() will launch the application on the desktop
179+ itself and not within the Unity8 UI.
180+
181+ """
182+ dash = self.main_window.get_dash()
183+ icon = dash.get_application_icon('Camera')
184+ self.touch.tap_object(icon)
185+
186+ # Ensure application is open
187+ bottombar = self.main_window.get_bottombar()
188+ self.assertThat(bottombar.applicationIsOnForeground, Eventually(Equals(True)))
189+
190+ # Because some tests are manually manipulating the finger, we want to
191+ # cleanup if the test fails, but we don't want to fail with an exception if
192+ # we don't.
193+ def _maybe_release_finger(self):
194+ """Only release the finger if it is in fact down."""
195+ if self.touch._touch_finger is not None:
196+ self.touch.release()
197+
198+
214199 def _get_hud_button_swipe_coords(self, main_view, hud_show_button):
215200 start_x = int(main_view.x + (main_view.width / 2))
216201 end_x = start_x