~woodrow-shen/unity/fix-lp-842693

« back to all changes in this revision

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

  • Committer: CI Train Bot
  • Author(s): handsome_feng
  • Date: 2016-03-18 10:10:36 UTC
  • mfrom: (4067.4.19 MoveDashToBottom)
  • Revision ID: ci-train-bot@canonical.com-20160318101036-qbi9g01cmjjtm1i2
Dash: move it down when the launcher is positioned at the bottom. Fixes: #1552630
Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
import logging
14
14
from testtools.matchers import Equals, GreaterThan
15
15
 
 
16
from unity.emulators.launcher import LauncherPosition
16
17
from unity.tests.launcher import LauncherTestCase
17
18
 
18
19
logger = logging.getLogger(__name__)
114
115
        self.addCleanup(self.keyboard.press_and_release, "Escape")
115
116
        self.launcher_instance.key_nav_enter_quicklist(self.launcher_position)
116
117
        self.assertThat(self.launcher_instance.quicklist_open, Eventually(Equals(True)))
117
 
        self.launcher_instance.key_nav_exit_quicklist()
118
 
        self.assertThat(self.launcher_instance.quicklist_open, Eventually(Equals(False)))
119
 
        self.assertThat(self.unity.launcher.key_nav_is_active, Eventually(Equals(True)))
120
 
        self.assertThat(self.unity.launcher.key_nav_is_grabbed, Eventually(Equals(True)))
 
118
        # We can't close a quicklist from keynav mode when launcher at bottom.
 
119
        if self.launcher_position == LauncherPosition.LEFT:
 
120
            self.launcher_instance.key_nav_exit_quicklist()
 
121
            self.assertThat(self.launcher_instance.quicklist_open, Eventually(Equals(False)))
 
122
            self.assertThat(self.unity.launcher.key_nav_is_active, Eventually(Equals(True)))
 
123
            self.assertThat(self.unity.launcher.key_nav_is_grabbed, Eventually(Equals(True)))
121
124
 
122
125
    def test_launcher_keynav_mode_toggles(self):
123
126
        """Tests that keynav mode toggles with Alt+F1."""