~unity-team/unity/7.1

« back to all changes in this revision

Viewing changes to tests/autopilot/unity/tests/launcher/test_keynav.py

  • Committer: Daniel van Vugt
  • Date: 2012-09-13 10:56:42 UTC
  • mfrom: (2684 unity)
  • mto: This revision was merged to the branch mainline in revision 2698.
  • Revision ID: daniel.van.vugt@canonical.com-20120913105642-9on2ald55h54j1zn
Merge latest lp:unity and fix conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
 
199
199
        self.assertThat(self.hud.visible, Equals(False))
200
200
        self.assertThat(self.launcher.key_nav_is_active, Equals(True))
 
201
 
 
202
    def test_launcher_keynav_cancel_on_click_outside(self):
 
203
        """A single click outside of launcher must cancel keynav."""
 
204
        self.start_keynav_with_cleanup_cancel()
 
205
 
 
206
        self.launcher_instance.move_mouse_to_right_of_launcher()
 
207
        self.mouse.click()
 
208
 
 
209
        self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))
 
210
 
 
211
    def test_launcher_keynav_cancel_on_click_icon(self):
 
212
        """A single click on a launcher icon must cancel keynav."""
 
213
        calc_win = self.start_app_window('Calculator', locale = 'C')
 
214
        calc_app = calc_win.application
 
215
        calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file)
 
216
 
 
217
        self.start_keynav_with_cleanup_cancel()
 
218
 
 
219
        self.launcher_instance.click_launcher_icon(calc_icon)
 
220
 
 
221
        self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))
 
222
 
 
223
    def test_launcher_keynav_cancel_on_quicklist_activate(self):
 
224
        """A single click on a quicklist item must cancel keynav."""
 
225
        self.start_keynav_with_cleanup_cancel()
 
226
        self.launcher_instance.key_nav_enter_quicklist()
 
227
 
 
228
        bfb_icon = self.launcher.model.get_bfb_icon()
 
229
        bfb_ql = bfb_icon.get_quicklist()
 
230
 
 
231
        bfb_ql.click_item(bfb_ql.selected_item)
 
232
        self.addCleanup(self.dash.ensure_hidden)
 
233
 
 
234
        self.assertThat(self.dash.visible, Eventually(Equals(True)))
 
235
        self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))
 
236