on xenial help sign in
Fixed whitespaces.
commit032768b48a9c006aa9350906da6db95c605f8e96 authorLeo Arias <leo.arias@canonical.com> dateWed 15 Jan 2014, 13:29 (13 years ago) parent05af309
3 files changed+10−5
tests/autopilot/unity8/shell/emulators/__init__.py+1−1 tests/autopilot/unity8/shell/emulators/dash.py+3−2 tests/autopilot/unity8/shell/tests/test_emulators.py+6−2
tests/autopilot/unity8/shell/emulators/__init__.py+1−1
@@ -25,7 +25,7 @@ class UnityEmulatorBase(introspection.CustomEmulatorBase):
2525
2626 def __init__(self, *args):
2727 super(UnityEmulatorBase, self).__init__(*args)
28− self.pointing_device = input.Touch.create()
28+ self.pointing_device = input.Pointer(device=input.Touch.create())
2929
3030
3131class UnityEmulatorException(Exception):
tests/autopilot/unity8/shell/emulators/dash.py+3−2
@@ -175,10 +175,11 @@ class DashApps(emulators.UnityEmulatorBase):
175175 category_element = self._get_category_element(category)
176176 icon = category_element.select_single('Tile', text=app_name)
177177 # FIXME some categories need a long press in order to see the preview.
178− # Some categories no not show previews, like recent apps.
178+ # Some categories do not show previews, like recent apps.
179179 # --elopio - 2014-1-14
180180 self.pointing_device.click_object(icon)
181− return self.get_root_instance.select_single(AppPreview)
181+ import pdb; pdb.set_trace()
182+ return self.get_root_instance().wait_select_single(AppPreview)
182183
183184
184185class AppPreview(emulators.UnityEmulatorBase):
tests/autopilot/unity8/shell/tests/test_emulators.py+6−2
@@ -155,7 +155,7 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
155155 'Title.1', 'Title.21', 'Title.41', 'Title.61', 'Title.81',
156156 'Title.101', 'Title.121', 'Title.141', 'Title.161', 'Title.181',
157157 'Title.201', 'Title.221', 'Title.241', 'Title.261', 'Title.281',]
158−
158+
159159 def setUp(self):
160160 super(DashAppsEmulatorTestCase, self).setUp()
161161 self.applications_scope = self.dash.open_scope('applications')
@@ -176,7 +176,7 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
176176 :expected_apps_count]
177177
178178 applications = self.applications_scope.get_applications(category)
179−
179+
180180 self.assertThat(applications, HasLength(expected_apps_count))
181181 for expected in expected_applications:
182182 self.assertThat(applications, Contains(expected))
@@ -186,3 +186,7 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
186186 category)
187187 grid = category_element.select_single('GenericFilterGrid')
188188 return grid.columns * grid.rows
189+
190+ def test_open_preview(self):
191+ preview = self.applications_scope.open_preview('installed', 'Title.1')
192+ self.assertIsInstance(preview, dash_emulators.AppPreview)