~mc-return/unity/unity.merge-fix1069243-update-manual-tests

« back to all changes in this revision

Viewing changes to tests/autopilot/unity/tests/test_command_lens.py

  • Committer: MC Return
  • Date: 2012-12-30 13:37:37 UTC
  • mfrom: (2849.2.159 trunk)
  • Revision ID: mc.return@gmx.net-20121230133737-9othnsjk2felbx53
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
from unity.tests import UnityTestCase
16
16
 
 
17
import gettext
17
18
 
18
19
class CommandLensSearchTests(UnityTestCase):
19
20
    """Test the command lense search bahavior."""
20
21
 
21
22
    def setUp(self):
22
23
        super(CommandLensSearchTests, self).setUp()
 
24
        gettext.install("unity-lens-applications")
23
25
 
24
26
    def tearDown(self):
25
27
        self.dash.ensure_hidden()
34
36
            self.keyboard.press_and_release("Delete")
35
37
 
36
38
        self.assertThat(self.dash.search_string, Eventually(Equals("")))
37
 
        results_category = command_lens.get_category_by_name("Results")
 
39
        results_category = command_lens.get_category_by_name(_("Results"))
38
40
        self.assertThat(results_category.is_visible, Eventually(Equals(False)))
39
41
 
40
42
    def test_results_category_appears(self):
44
46
        # lots of apps start with 'a'...
45
47
        self.keyboard.type("a")
46
48
        self.assertThat(self.dash.search_string, Eventually(Equals("a")))
47
 
        results_category = command_lens.get_category_by_name("Results")
 
49
        results_category = command_lens.get_category_by_name(_("Results"))
48
50
        self.assertThat(results_category.is_visible, Eventually(Equals(True)))
49
51
 
50
52
    def test_result_category_actually_contains_results(self):
54
56
        # lots of apps start with 'a'...
55
57
        self.keyboard.type("a")
56
58
        self.assertThat(self.dash.search_string, Eventually(Equals("a")))
57
 
        results_category = command_lens.get_category_by_name("Results")
 
59
        results_category = command_lens.get_category_by_name(_("Results"))
58
60
        results = results_category.get_results()
59
61
        self.assertTrue(results)
60
62