~mzanetti/unity8/fix-1219035

« back to all changes in this revision

Viewing changes to tests/autopilot/unity8/shell/tests/test_hud.py

  • Committer: Michael Zanetti
  • Date: 2013-09-04 14:41:27 UTC
  • Revision ID: michael.zanetti@canonical.com-20130904144127-2lfzwffpqqna1ejd
adjust hud button test to also check if it correctly disappears when releasing outside the button

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
            hud_show_button
50
50
        )
51
51
        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);
54
54
        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)))
55
57
 
56
58
    def test_show_hud_appears(self):
57
59
        """Releasing the touch on the 'show hud' button must display the hud.